-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[OTLP] add entity processor to the otlp metrics and logs pipeline #1504
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
translator/tocwconfig/sampleConfig/otlp_metrics_cloudwatchlogs_config.yaml
Outdated
Show resolved
Hide resolved
We've decided to just add this functionality to just K8S/EKS for the time being. |
…o otlp configuration, and cherry-picked otlp translation changes from #1504
validDestination := slices.Contains(supportedEntityProcessorDestinations[:], t.Destination()) | ||
// ECS is not in scope for entity association, so we only add the entity processor in non-ECS platforms | ||
isECS := ecsutil.GetECSUtilSingleton().IsECS() | ||
if entityProcessor != nil && currentContext.Mode() == config.ModeEC2 && !isECS && validDestination { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just make sure the mode is set to EC2 incase of EKS and k8sonEC2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On EKS, I can confirm it's set to EC2
As for K8sOnEC2, it will be EC2 if the configured mode is EC2. Code ref:
amazon-cloudwatch-agent/translator/util/sdkutil.go
Lines 75 to 77 in bb8a31b
if configuredMode == config.ModeEC2 { | |
return config.ModeK8sEC2 | |
} |
receivers: []string{"nop", "other"}, | ||
processors: []string{"awsentity/service/otlp", "cumulativetodelta/hostOtlpMetrics"}, | ||
exporters: []string{"awscloudwatch"}, | ||
extensions: []string{"agenthealth/metrics", "agenthealth/statuscode"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We see server extension on manual testing , why not here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's just because of how the translation responsibilities are split up. So it's not really unit-testable (that is unless I did a refactor).
It's set here:
amazon-cloudwatch-agent/translator/translate/otel/translate_otel.go
Lines 91 to 93 in bb8a31b
if context.CurrentContext().KubernetesMode() != "" { | |
pipelines.Translators.Extensions.Set(server.NewTranslator()) | |
} |
- agenthealth/metrics | ||
- agenthealth/statuscode | ||
- entitystore | ||
- server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we add the server extension can you query the server endpoint and check whether it is generating the pod to service map with correct values in case of just otlp in config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description of the issue
We want the ability to send entities for customers sending custom metrics via otlp: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-OpenTelemetry-metrics.html
This is currently be limited to just EKS/K8S.
Description of changes
License
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Tests
Manual Testing
Using the following agent configuration:
Output
EMF
Translated YAML config output for EC2
Translated YAML config output for K8S
Requirements
Before commit the code, please do the following steps.
make fmt
andmake fmt-sh
make lint