sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

Document StartOrContinueTrace (vs StartTransaction)

Open jamescrosswell opened this issue 10 months ago • 3 comments

Originally posted by @jamescrosswell in #3836

The SDK includes a StartOrContinueTrace method that returns a transaction context but doesn't use that context to start a new transaction...

https://github.com/getsentry/sentry-dotnet/blob/3e70c3126515c87b1851b6a9a7afd99ffbb9aeb7/src/Sentry.AspNet/HttpContextExtensions.cs#L60-L130

Under the hood, this propagates trace headers even when performance is disabled: https://github.com/getsentry/sentry-dotnet/blob/3fde00a69fae336e7d369a80ecd3bbc01e7b1d2d/src/Sentry/Internal/Hub.cs#L252-L253

Later this information gets used when forming headers for outbound requests: https://github.com/getsentry/sentry-dotnet/blob/3fde00a69fae336e7d369a80ecd3bbc01e7b1d2d/src/Sentry/Internal/Hub.cs#L200-L211

That intent should be clearly documented in the summary for the StartOrContinueTrace method.

References

  • https://github.com/getsentry/sentry-dotnet/pull/2493

jamescrosswell avatar Dec 10 '24 21:12 jamescrosswell