sentry-dotnet
sentry-dotnet copied to clipboard
Read Activity data into event
ASP.NET Core 3.0+ have support to W3C context propagation out of the box. The current SDK already has an options to control whether to read Activity data and some data is already read.
The goal is to read the new values and enhance the SDK and possibly the protocol to read them.
Would be nice if sentry tracing would be compatible with default dotnet core distributed tracing. Are there any plans for that?
@alesdvorakcz could you please elaborate what are your expectations in that regard?
Using the W3C trace headers? Something else?
Yes exactly. dotnet core has build in tracing, from .NET 5 it is using open telemetry standard from W3C. It works trough System.Diagnostics.Activity and System.Diagnostics.ActivitySource classes and it should be well integrated with many dotnet core libraries. I think it would be great if sentry could connect to this system so there is no need to create other Spans/Activities specifically for sentry. More info in official docs
That aligns with the goals of this issue. Thanks for sharing.
Any update on this? Not having this greatly reduces the usefulness of the SDK.
In particular, third-party libraries that are already instrumented using Activity won't include span information. So instead, we would have to wrap all calls with our own calls to StartChild. Additionally, the code in our project was already instrumented with Activity, so to get value out of this, we have to start calling the SentrySDK.* methods directly.
https://learn.microsoft.com/en-us/dotnet/core/diagnostics/distributed-tracing-instrumentation-walkthroughs
Just an update for everyone. This is still on our radar, and we're planning out how it would work exactly. We'd like to have support for Open Telemetry in the base .NET SDK, and integrate with ASP.NET Core's support where appropriate. I'm very open to feedback and suggestions of exactly how this would work and what the APIs would look like.
David Fowler recently posted this thread on Twitter: https://twitter.com/davidfowl/status/1588942067157594112
We could take a similar approach. Or we could try to do more automagically. Thoughts?
@bruno-garcia is there anything additional implied in this issue that isn't already covered by the work we're doing on OpenTelemetry or would releasing Sentry.OpenTelementry close this issue?
I didn't look into what's available. The goal of the ticket was to find out opportunities and enhance our context/scope with that data when available. So feel free to close if that's done.