[exporter/awsxrayexporter] fix messaging system logic#42633
Conversation
|
Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib. Important reminders:
A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better! |
wangzlei
left a comment
There was a problem hiding this comment.
LGTM.
literally, consumer span is the local root span, should be translated to xray Segment instead of Subsegment.
|
Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib. Important reminders:
A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better! |
|
@TylerHelmuth Please help merge the PR, thanks! |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
Thank you for your contribution @ezhang6811! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey. |
…#42633) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Set `namespace="remote"` for producer spans so that X-ray will infer a downstream service node. Changed consumer spans to be segments so that they can correlate to their own node while being downstream from the producer. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#40995 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests for producer span and updated unit tests for consumer spans. <!--Please delete paragraphs that you did not use before submitting.-->
…#42633) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Set `namespace="remote"` for producer spans so that X-ray will infer a downstream service node. Changed consumer spans to be segments so that they can correlate to their own node while being downstream from the producer. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#40995 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests for producer span and updated unit tests for consumer spans. <!--Please delete paragraphs that you did not use before submitting.-->
…#42633) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Set `namespace="remote"` for producer spans so that X-ray will infer a downstream service node. Changed consumer spans to be segments so that they can correlate to their own node while being downstream from the producer. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#40995 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests for producer span and updated unit tests for consumer spans. <!--Please delete paragraphs that you did not use before submitting.-->
…#42633) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Set `namespace="remote"` for producer spans so that X-ray will infer a downstream service node. Changed consumer spans to be segments so that they can correlate to their own node while being downstream from the producer. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#40995 <!--Describe what testing was performed and which tests were added.--> #### Testing Added unit tests for producer span and updated unit tests for consumer spans. <!--Please delete paragraphs that you did not use before submitting.-->
… segments Before this change, an X-Ray segment produced from a Consumer span that is a local root used the remote service name (aws.remote.service) or, if that attribute was absent, fell back to the span (operation) name. Server local root spans already used aws.local.service / resource service.name. Consumer local root spans should behave the same way now that PR open-telemetry#42633 promotes them to Segments. Changes in MakeSegment: 1. Extend the aws.local.service attribute check to also cover Consumer spans that are local roots (mirrors the existing Server logic). 2. Extend the resource.service.name fallback to also cover Consumer local root spans when neither aws.local.service nor aws.remote.service is set. Fixes open-telemetry#43432 Assisted-by: Claude Sonnet 4.6
… segments After PR open-telemetry#42633 promoted Consumer local root spans to X-Ray Segments, the service segment naming still fell through to the span (operation) name when aws.local.service was absent, while Server segments already fell back to resource.service.name. Fix is applied directly in MakeServiceSegmentForLocalRootDependencySpan rather than in MakeSegment, so the dependency subsegment produced alongside is unaffected regardless of whether aws.remote.service is present. Naming priority for the service segment (unchanged for all other paths): 1. aws.local.service attribute (existing behavior) 2. resource.service.name (new fallback, mirrors Server span behavior) 3. span name / other existing fallbacks Fixes open-telemetry#43432 Assisted-by: Claude Sonnet 4.6
… segments Before this change, an X-Ray segment produced from a Consumer span that is a local root used the remote service name (aws.remote.service) or, if that attribute was absent, fell back to the span (operation) name. Server local root spans already used aws.local.service / resource service.name. Consumer local root spans should behave the same way now that PR open-telemetry#42633 promotes them to Segments. Changes in MakeSegment: 1. Extend the aws.local.service attribute check to also cover Consumer spans that are local roots (mirrors the existing Server logic). 2. Extend the resource.service.name fallback to also cover Consumer local root spans when neither aws.local.service nor aws.remote.service is set. Fixes open-telemetry#43432 Assisted-by: Claude Sonnet 4.6
… segments After PR open-telemetry#42633 promoted Consumer local root spans to X-Ray Segments, the service segment naming still fell through to the span (operation) name when aws.local.service was absent, while Server segments already fell back to resource.service.name. Fix is applied directly in MakeServiceSegmentForLocalRootDependencySpan rather than in MakeSegment, so the dependency subsegment produced alongside is unaffected regardless of whether aws.remote.service is present. Naming priority for the service segment (unchanged for all other paths): 1. aws.local.service attribute (existing behavior) 2. resource.service.name (new fallback, mirrors Server span behavior) 3. span name / other existing fallbacks Fixes open-telemetry#43432 Assisted-by: Claude Sonnet 4.6
Description
Set
namespace="remote"for producer spans so that X-ray will infer a downstream service node. Changed consumer spans to be segments so that they can correlate to their own node while being downstream from the producer.Link to tracking issue
Fixes #40995
Testing
Added unit tests for producer span and updated unit tests for consumer spans.