-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(core): Implement strictTraceContinuation
#16313
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
base: develop
Are you sure you want to change the base?
Conversation
size-limit report 📦
|
packages/core/src/tracing/trace.ts
Outdated
const incomingDsc = baggageHeaderToDynamicSamplingContext(baggage); | ||
const baggageOrgId = incomingDsc?.org_id; | ||
|
||
let sdkOrgId: string | undefined; |
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.
m: I think we should use the same logic here as for injecting the org id, which is use the specified one if defined, else extract it from dsn? We may also put this into a reusable utility, I suppose!
packages/core/src/tracing/trace.ts
Outdated
sdkOrgId = extractOrgIdFromDsnHost(dsn.host); | ||
} | ||
|
||
const shouldStartNewTrace = (): boolean => { |
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.
l: Let's maybe make this a separate function that takes arguments instead of inlining this function? No strong feelings, but this is how we usually do this I suppose 🤔
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.
yeah no strong opinions about this. Just thought it's not a lot of logic and when inlining this it does not disrupt you from the code-reading flow but it still keeps this part of the code separated :D
This implements
strictTraceContinuation
based on those docs: https://develop.sentry.dev/sdk/telemetry/traces/#stricttracecontinuationcloses #16291