Skip to content
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

Tracing without Performance #1525

Closed
5 tasks done
Tracked by #5
cleptric opened this issue May 8, 2023 · 0 comments · Fixed by #1516
Closed
5 tasks done
Tracked by #5

Tracing without Performance #1525

cleptric opened this issue May 8, 2023 · 0 comments · Fixed by #1516

Comments

@cleptric
Copy link
Member

cleptric commented May 8, 2023

Tasks

To always have access to a trace and span ID, add a new internal PropagationContext property to the scope, an object holding a traceId and spanId and an optional dynamicSamplingContext.

Populate the traceId and spanId with valid, random IDs on construction.

You may update the traceId and dynamicSamplingContext from the request headers during an incoming request or if the process was exposed to a SENTRY_TRACE and/or SENTRY_BAGGAGE environment variable if performance is disabled.

The Dynamic Sampling Context should be lazily constructed once needed, using a new fromOptions function that constructs the DSC based on the client options if performance is disabled.

When captureEvent is called, you may use these values on the scope as a fallback to construct the trace context and envelope header item if no transaction exists in the SDK.

For outgoing HTTP requests, use the values in the scope as a fallback if no transaction is present. The sentry-trace will contain a trailing -0 indicating an unsampled transaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant