SentrySdk.ContinueTrace(traceHeader, baggageHeader) followed by SentrySdk.StartTransaction(context) is the documented way to continue a distributed trace from a non-HTTP boundary (#2646).
I'm not sure that's true... that PR was closed - never merged.
To be honest, I'm not sure if we have an explicit way to continue traces from a non-HTTP boundary. The ContinueTrace method stores trace information in the propagation context which, so far, is only really used to apply trace information to events when tracing is disabled - e.g. here:
|
// If there is no span on the scope (and not just no sampled one), fall back to the propagation context |
|
ApplyTraceContextToEvent(evt, scope.PropagationContext); |
Propagating from non-HTTP boundaries should be possible but it requires a bit of investigation/planning. I won't have time for this immediately as we need to get the SDK ready for .NET 11. I also don't have time to review any moderately complex PRs at the moment.
I'll create an issue for this so that we can priorities and schedule in the work once the work for .NET 11 is complete.
Originally posted by @jamescrosswell in #5569 (comment)
I'm not sure that's true... that PR was closed - never merged.
To be honest, I'm not sure if we have an explicit way to continue traces from a non-HTTP boundary. The
ContinueTracemethod stores trace information in the propagation context which, so far, is only really used to apply trace information to events when tracing is disabled - e.g. here:sentry-dotnet/src/Sentry/Internal/Hub.cs
Lines 677 to 678 in 9683c36
Propagating from non-HTTP boundaries should be possible but it requires a bit of investigation/planning. I won't have time for this immediately as we need to get the SDK ready for .NET 11. I also don't have time to review any moderately complex PRs at the moment.
I'll create an issue for this so that we can priorities and schedule in the work once the work for .NET 11 is complete.
Originally posted by @jamescrosswell in #5569 (comment)