-
-
Notifications
You must be signed in to change notification settings - Fork 210
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
OpenTelemetry integration throws an exception when Sentry is disabled #3156
Conversation
…ry-dotnet into fix/otel-getsentryoptions
Maybe it's time to remove the attribute again? I wasn't even aware we were doing this until last week and ran headfirst into a wall with the assumption that we don't. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
Yeah I think we can always set an environment variable if we want/need... I'm OK with removing it. Separate PR for that maybe? |
…ry-dotnet into fix/otel-getsentryoptions
Fixes #3155
Ultimately I've fixed this in the
TraceProviderBuilderExtensions
:sentry-dotnet/src/Sentry.OpenTelemetry/TracerProviderBuilderExtensions.cs
Lines 45 to 47 in 3b09187
I also refactored those slighly for testability.
Note
We didn't pick up on this because we configure the DSN via an attribute in our sample projects... so even if you tried to force the DSN to be disabled when using our Otel sample, it would use a Valid DSN 😢
sentry-dotnet/samples/Directory.Build.props
Lines 25 to 29 in 6f037bd