-
-
Notifications
You must be signed in to change notification settings - Fork 493
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 #2056
Labels
Comments
This was referenced Jul 27, 2023
This was referenced Aug 16, 2023
sl0thentr0py
added a commit
that referenced
this issue
Sep 1, 2023
This PR is 1/2 to enable **Tracing without Performance**, i.e. make sure all our events are connected even if they are not Transactions. This enables use cases such as Errors / Transactions / Replays etc all being connected across services and not just Transactions. ### Summary of changes * new `PropagationContext` class that generates trace/span ids and baggage irrespective of whether there are transactions/spans active or not * this lives on the `Scope` * three new top level methods that first check the span and fallback on the scope's propagation context * `Sentry.get_traceparent` * `Sentry.get_baggage` * `Sentry.get_trace_propagation_headers` * move `dynamic_sampling_context` to `Event` from `TransactionEvent` since all events will now have this info * use the new top level helpers in `net/http` patch to set propagation headers closes #2056 also see #2089 --- This PR is 2/2 to enable Tracing without Performance, i.e. make sure all our events are connected even if they are not Transactions. ### Summary of changes * Implement new top level `Sentry.continue_trace(env, **options)` API that standardizes continuing an incoming trace from a rack env like hash. * Use this new API in rack/rails/sidekiq part of #2056 linked to #2084
tracking env variables separately, closing this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Internal Notion Page:
https://www.notion.so/sentry/Tracing-without-performance-efab307eb7f64e71a04f09dc72722530
To always have access to a trace and span ID, add a new internal
PropagationContext
property to the scope, an object holding atraceId
andspanId
and an optionaldynamicSamplingContext
.Populate the
traceId
andspanId
with valid, random IDs on construction.You may update the
traceId
anddynamicSamplingContext
from the request headers during an incoming request or if the process was exposed to aSENTRY_TRACE
and/orSENTRY_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 thetrace
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.Task List for each SDK
The text was updated successfully, but these errors were encountered: