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

[OTel] Implement better panic recovery #582

Open
tonyo opened this issue Feb 16, 2023 · 0 comments
Open

[OTel] Implement better panic recovery #582

tonyo opened this issue Feb 16, 2023 · 0 comments
Labels
Status: Backlog Topic: OpenTelemetry Issue/PR related to OpenTelemetry integration Type: Feature

Comments

@tonyo
Copy link
Contributor

tonyo commented Feb 16, 2023

Summary

Capture panics in OpenTelemetry-instrumented code and send errors to Sentry.

Motivation

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Backlog Topic: OpenTelemetry Issue/PR related to OpenTelemetry integration Type: Feature
Projects
None yet
Development

No branches or pull requests

1 participant