-
-
Notifications
You must be signed in to change notification settings - Fork 435
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
Add OpenTelemetryLinkErrorEventProcessor for linking errors to traces created via OpenTelemetry #2418
Add OpenTelemetryLinkErrorEventProcessor for linking errors to traces created via OpenTelemetry #2418
Conversation
… created via OpenTelemetry
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
10bb0b0 | 305.47 ms | 334.56 ms | 29.09 ms |
fd9d617 | 319.02 ms | 351.73 ms | 32.71 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
10bb0b0 | 1.73 MiB | 2.32 MiB | 612.39 KiB |
fd9d617 | 1.73 MiB | 2.32 MiB | 612.36 KiB |
Codecov ReportBase: 80.03% // Head: 79.87% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## feat/allow-turning-off-auto-init-in-otel-agent #2418 +/- ##
====================================================================================
- Coverage 80.03% 79.87% -0.17%
+ Complexity 3765 3759 -6
====================================================================================
Files 301 302 +1
Lines 14207 14222 +15
Branches 1884 1886 +2
====================================================================================
- Hits 11371 11360 -11
- Misses 2092 2119 +27
+ Partials 744 743 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
LGTM!
parentSpanId, | ||
null); | ||
|
||
event.getContexts().setTrace(spanContext); |
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.
l: I'm probably missing some context here, but is it fine to override the existing trace context?
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.
I'd say yes because it only does so in case instrumenter is set to otel
, there's an OTEL span with valid IDs and it can find the Sentry span in the shared storage. For now we don't allow starting transactions outside of OTEL if instrumenter is set to otel
. So there shouldn't be anything worth keeping in there.
📜 Description
Retrieve current
Span
from OpenTelemetry, then look up the Sentry span viaspanId
and addtraceId
,spanId
,parentSpanId
andop
to the error events context keyed"trace"
.Had to move
SentrySpanStorage
fromsentry-opentelemetry-core
module tosentry
module to avoid yet another module just for providingSentrySpanStorage
in the bootstrap classloader.💡 Motivation and Context
With this change, Sentry UI can now show a link from transaction to error event and vice versa.
💚 How did you test it?
Manually via Spring Boot Sample
📝 Checklist
🔮 Next steps