Skip to content
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

Fixed Sentry.Samples.OpenTelemetry.Console #2635

Merged
merged 1 commit into from
Sep 19, 2023

Conversation

jamescrosswell
Copy link
Collaborator

#skip-changelog

For console applications, Sentry needs to be initialised before OpenTelemetry... otherwise the SentryOptions aren't available in and we get an exception from the following code:

if (_options is not { })
{
throw new InvalidOperationException(
"The Sentry SDK has not been initialised. To use Sentry with OpenTelemetry tracing you need to " +
"initialize the Sentry SDK.");
}

@bitsandfoxes bitsandfoxes merged commit e6bb733 into main Sep 19, 2023
16 checks passed
@bitsandfoxes bitsandfoxes deleted the fix/otel-console-sample branch September 19, 2023 14:57
vaind pushed a commit that referenced this pull request Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants