-
-
Notifications
You must be signed in to change notification settings - Fork 206
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
WIP: System.Diagnostic wrappers #3238
Conversation
Unfortunately in some of our code the details of our internal tracing bleed out via a public interface in the sentry-dotnet/src/Sentry/SentryMessageHandler.cs Lines 59 to 75 in 0ee3904
Both the To avoid a breaking change then, it might be necessary to create copies of these classes that use the new |
…otnet into diagnosticsource-otel
Another experiment related to #3159
The plan here is to leverage
System.Diagnostics.DiagnosticSource
under the hood for tracing (this is the technology underpinning OTel in .NET). This has been part of .NET since version 5.0.0 so we'll enable it by default for users targeting net5.0 and later.For users targeting .NET Framework or .NET Core 3.1 and earlier this will be opt in via the
Sentry.DiagnosticSource
package.TODO
SentryHttpMessageHandler
andSentryGraphQLHttpMessageHandler
create spans and propagates contextHttpContextExtensions
creates spans and propagates contextSentryTracingMiddleware
creates spans and propagates contextSentryFunctionsWorkerMiddleware
creates spans and propagates contextSentrySqlListener
andEFDiagnosticSourceHelper
create spansSentryQueryPerformanceListener
creates spansSentryPropagator
. That extendsOpenTelemetry.Context.Propagation.BaggagePropagator
so we'll need to extract the relevant bits to some helper class that is used by both BaggagePropagator andActivitySpanProcessor
. Need to work out when/why this gets leveraged in the OpenTelemetry code so that we can mimic this as well.OpenTelemetryTransactionProcessor
? Possibly rename this toActivityTransactionProcessor
and move it toSentry.DiagnosticSource
...Hub.GetSpan()
, such asHub.GetTraceHeader
andHub.GetBaggage
... how will these work with Activity.Current? How will propagation etc. work?Out of scope
Sentry.OpenTelemetry
uses OpenTelemetry instrumentation (not the new tracing interfaces).The following integrations are also out of scope as they don't include any tracing functionality: