We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Capture panics in OpenTelemetry-instrumented code and send errors to Sentry.
At the moment people have to manually defer sentry.Recover() or sentry.RecoverWithContext() calls to catch panics. For OpenTelemetry-instrumented code, panics are handled inside Span.End(): https://github.com/open-telemetry/opentelemetry-go/blob/d68b05fbeecb0112da0b5614a78b0187a4a0ad7a/sdk/trace/span.go#L381-L398 So what we can do to access that error, is to inspect span events inside SentrySpanProcessor's OnEnd(), and then build and send a Sentry event.
sentry.Recover()
sentry.RecoverWithContext()
Span.End()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary
Capture panics in OpenTelemetry-instrumented code and send errors to Sentry.
Motivation
At the moment people have to manually defer
sentry.Recover()
orsentry.RecoverWithContext()
calls to catch panics.For OpenTelemetry-instrumented code, panics are handled inside
Span.End()
: https://github.com/open-telemetry/opentelemetry-go/blob/d68b05fbeecb0112da0b5614a78b0187a4a0ad7a/sdk/trace/span.go#L381-L398So what we can do to access that error, is to inspect span events inside SentrySpanProcessor's OnEnd(), and then build and send a Sentry event.
The text was updated successfully, but these errors were encountered: