-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/awsxray] Does not retain CloudWatch Log Group information #31784
Labels
Comments
jefchien
added
bug
Something isn't working
needs triage
New item requiring triage
labels
Mar 15, 2024
Pinging code owners: See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This was referenced Mar 19, 2024
This was referenced Apr 2, 2024
codeboten
pushed a commit
that referenced
this issue
Apr 26, 2024
From the issue: > X-Ray segments have a few [optional fields](https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html#api-segmentdocuments-aws) that carry AWS resource data. As part of the translation of X-Ray segments to spans, the translator [extracts AWS data](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/awsxrayreceiver/internal/translator/aws.go#L15) and puts them in the resource attributes. It does this for EC2, ECS, Beanstalk, and EKS, but not for CloudWatch Logs. So, by the time the span [reaches the exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/awsxrayexporter/internal/translator/aws.go#L109), that information is lost. This change adds the cloudwatch logs metadata to the attributes with the keys `conventions.AttributeAWSLogGroupARNs` and `conventions.AttributeAWSLogGroupNames`. Both of these are used by the awsxrayexporter to restore the `LogGroupMetadata`. https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/decc66f276b9bb3ca7b775d59a93340503668641/exporter/awsxrayexporter/internal/translator/aws.go#L109-L112 https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/decc66f276b9bb3ca7b775d59a93340503668641/exporter/awsxrayexporter/internal/translator/aws.go#L293-L295 Fixes #31784 **Testing:** Added unit tests to validate the translation to attributes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Component(s)
receiver/awsxray
What happened?
Description
X-Ray segments have a few optional fields that carry AWS resource data. As part of the translation of X-Ray segments to spans, the translator extracts AWS data and puts them in the resource attributes. It does this for EC2, ECS, Beanstalk, and EKS, but not for CloudWatch Logs. So, by the time the span reaches the exporter, that information is lost.
Steps to Reproduce
Use the AWS X-Ray SDK and include CloudWatch Logs resource data.
Expected Result
The resource data gets forwarded to the exporter and passed along to X-Ray Frontend. This allows the logs to be correlated with the traces.
Actual Result
The logs information is not sent to the X-Ray Frontend and it is unavailable in the console.
Collector version
v0.89.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: