Skip to content

Conversation

zzhlogin
Copy link
Contributor

@zzhlogin zzhlogin commented Sep 10, 2024

Issue #, if available:

Description of changes:
Fix the bug: When trace is not sampled, the span attributes is None, RemoteOperation and RemoteService becomes Unknown.

Testing:
Before the change:
OTEL_TRACES_SAMPLER=traceidratio OTEL_TRACES_SAMPLER_ARG="0.0":
Screenshot 2024-09-10 at 11 40 22 AM

OTEL_TRACES_SAMPLER=xray OTEL_TRACES_SAMPLER_ARG="endpoint=http://localhost:2000" with more than 1 segments per second:
Screenshot 2024-09-10 at 12 41 34 PM

After the change:
OTEL_TRACES_SAMPLER=traceidratio OTEL_TRACES_SAMPLER_ARG="0.0":
Screenshot 2024-09-10 at 12 02 07 PM

OTEL_TRACES_SAMPLER=xray OTEL_TRACES_SAMPLER_ARG="endpoint=http://localhost:2000" with more than 1 segments per second:
Screenshot 2024-09-10 at 12 22 58 PM

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@zzhlogin zzhlogin requested a review from a team as a code owner September 10, 2024 19:19
@zzhlogin zzhlogin merged commit 4b36553 into main Sep 10, 2024
11 checks passed
@zzhlogin zzhlogin deleted the fix_sampler branch September 10, 2024 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants