-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
Initialize Sentry in OTEL Java Agent and allow configuring it #2386
Initialize Sentry in OTEL Java Agent and allow configuring it #2386
Conversation
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b7848db | 253.74 ms | 339.94 ms | 86.19 ms |
93fc323 | 427.42 ms | 486.69 ms | 59.27 ms |
b1066e6 | 294.94 ms | 308.87 ms | 13.93 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
b7848db | 1.73 MiB | 2.32 MiB | 610.45 KiB |
93fc323 | 1.73 MiB | 2.32 MiB | 610.45 KiB |
b1066e6 | 1.73 MiB | 2.32 MiB | 610.45 KiB |
Codecov ReportBase: 80.36% // Head: 80.35% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## feat/do-not-attach-empty-trace-and-baggage-headers #2386 +/- ##
========================================================================================
- Coverage 80.36% 80.35% -0.02%
Complexity 3695 3695
========================================================================================
Files 292 292
Lines 13795 13797 +2
Branches 1822 1823 +1
========================================================================================
Hits 11086 11086
- Misses 2000 2001 +1
- Partials 709 710 +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. |
…st to make sure baggage is frozen
} | ||
} | ||
} catch (Exception e) { | ||
// ignore |
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
: can we use logger here instead?
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.
Will do
final @Nullable String otelVersion = | ||
mainAttributes.getValue("Sentry-Opentelemetry-Version-Name"); | ||
if (otelVersion != null) { | ||
sdkVersion.addPackage("maven:io.opentelemetry:opentelemetry-sdk", otelVersion); |
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.
m
: do we also add 3rd-party version to the sdk 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.
Yeah, discussed with someone from backend team. Should be fine. Is there a better place to put it?
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.
packages/modules maybe? that's where we put the 3rd-party stuff
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.
You mean this:
private @Nullable Map<String, String> modules; |
That's for errors, not transactions unfortunately.
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.
ah yeah, then it's probably fine like that
...ization/src/main/java/io/sentry/opentelemetry/SentryAutoConfigurationCustomizerProvider.java
Show resolved
Hide resolved
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.
Can we add a README to sentry-opentelemetry/*
that roughly describes instructions for using the agent? We can rely on that while in the mean time before we have proper docs.
#skip-changelog
📜 Description
Can configure as usual (env vars and props file)
💡 Motivation and Context
To not have to add Sentry to the actual application but be able to initialize and configure inside the Agent.
💚 How did you test it?
📝 Checklist
🔮 Next steps