-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
Fix incoming defer sampling decision sentry-trace header #3942
Conversation
|
...y-samples-spring-boot-opentelemetry/src/test/kotlin/io/sentry/systemtest/PersonSystemTest.kt
Outdated
Show resolved
Hide resolved
samplingDecision = new TracesSamplingDecision(sampled, sampleRate); | ||
} else { | ||
samplingDecision = new TracesSamplingDecision(sampled); | ||
if (parentSampled != null) { |
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.
now uses null
sampling decision instead of false
for incoming sentry-trace header with deferred sampling decision. This causes sentry sampler to make a decision instead of assuming false
from parent should be copied.
...-jakarta/src/test/kotlin/io/sentry/spring/boot/jakarta/SentrySpanRestClientCustomizerTest.kt
Show resolved
Hide resolved
...-jakarta/src/test/kotlin/io/sentry/spring/boot/jakarta/SentrySpanRestClientCustomizerTest.kt
Show resolved
Hide resolved
...y-samples-spring-boot-opentelemetry/src/test/kotlin/io/sentry/systemtest/PersonSystemTest.kt
Show resolved
Hide resolved
@@ -44,4 +44,70 @@ class PersonSystemTest { | |||
testHelper.doesTransactionContainSpanWithOp(transaction, "spanCreatedThroughSentryApi") | |||
} | |||
} | |||
|
|||
@Test |
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.
TODO use @BeforeTest
instead of @Before
as it looks like it's not resetting between tests in the same test class.
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.
TODO copy this test over to other samples (e.g. jakarta version of this)
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.
Let's do this in a follow up PR
Performance metrics 🚀
|
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 👍
📜 Description
Fix incoming defer sampling decision sentry-trace header
And forward
isSampled
from propagation context to sentry-trace header when not building tracing info from a span.💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps