-
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
[exporter/awsxray] Metadata from X-Ray SDK wrapped in aws.xray.metadata #23610
Labels
Comments
jefchien
added
bug
Something isn't working
needs triage
New item requiring triage
labels
Jun 21, 2023
Please assign this to me. |
Pinging code owners: See Adding Labels via Comments if you do not have permissions to add labels yourself. |
bryan-aguilar
added
priority:p2
Medium
and removed
needs triage
New item requiring triage
labels
Aug 11, 2023
codeboten
pushed a commit
that referenced
this issue
Sep 21, 2023
**Description:** The X-Ray receiver [marshals the metadata](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/awsxrayreceiver/internal/translator/metadata.go#L16) from the X-Ray SDK, but the exporter doesn't unmarshal the metadata, which results in squashed and incorrectly nested metadata. ``` "metadata": { "default": { "aws.xray.metadata.http": "{\"connection\":{\"reused\":false,\"was_idle\":false}}" } }, ``` instead of ``` "metadata": { "http": { "connection": { "was_idle": false, "reused": false } } }, ``` Changes the exporter translator to check for the metadata attribute prefix and attempt to unmarshal those. **Link to tracking Issue:** #23610 **Testing:** Added unit test. Ran the change with the collector and verified in the AWS X-Ray console.
jmsnll
pushed a commit
to jmsnll/opentelemetry-collector-contrib
that referenced
this issue
Nov 12, 2023
**Description:** The X-Ray receiver [marshals the metadata](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/awsxrayreceiver/internal/translator/metadata.go#L16) from the X-Ray SDK, but the exporter doesn't unmarshal the metadata, which results in squashed and incorrectly nested metadata. ``` "metadata": { "default": { "aws.xray.metadata.http": "{\"connection\":{\"reused\":false,\"was_idle\":false}}" } }, ``` instead of ``` "metadata": { "http": { "connection": { "was_idle": false, "reused": false } } }, ``` Changes the exporter translator to check for the metadata attribute prefix and attempt to unmarshal those. **Link to tracking Issue:** open-telemetry#23610 **Testing:** Added unit test. Ran the change with the collector and verified in the AWS X-Ray console.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component(s)
exporter/awsxray
What happened?
Description
The awsxrayreceiver uses the JSON marshaler to convert the metadata received from the X-Ray SDK into a string as part of the translation to the OTEL span attributes. It also appends a prefix
aws.xray.metadata
to the metadata key. This isn't a problem for other exporters, but the awsxrayexporter should unmarshal the strings and strip the attribute prefix.Steps to Reproduce
Start up the collector with awsxray receiver/exporter and the batch processor. Default configuration is fine. Use the X-Ray SDK to send a segment with metadata attached.
Expected Result
From inspecting the raw segment in the X-Ray console.
Actual Result
Collector version
v0.78.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: