-
-
Notifications
You must be signed in to change notification settings - Fork 459
Description
Description
More details tbd
Our plan is to create a SpanProcessor
(for sending spans to Sentry) as well as probably a TextMapPropagator
(for dealing with tracing across systems).
We'll probably also need to provide an agent JAR
for people to auto instrument their applications.
There may be problems with initializing Sentry in combination with the agent, needs investigation.
Implementing it should address #1348 .
Here's issues on other SDKs implementing OTEL support:
- Ruby SDK basic OTEL Support sentry-ruby#1907
- Basic OpenTelemetry (OTEL) Support sentry-python#1687
- Add OpenTelemetry Node Package sentry-javascript#6000
- [GO] Add basic OpenTelemetry support sentry-go#486
Challenges faced
Accessing the initialized Sentry
instance of the target application from the OTEL Java Agent
Asked on OTEL GH and got some suggestions:
Use reflection
This would require us to perform every interaction with Sentry using reflection, not just retrieving the instance but every invocation which would lead to very difficult maintenance and brittle code
Add Sentry
to the bootstrap classloader
so the same instance can be accessed from the target application and the OTEL Java Agent: This requires us to create our own custom distro of the OTEL Java Agent as shown in their samples. We first tried producing an agent JAR with SpanProcessor
added as extension but that didn't allow us to add to the bootstrap classloader.
TODOs
- Merge feature into
main
- Release
- Document
- Create new modules for OTEL
- Add new modules to release registry
- Add
instrumenter
to options and makestartTransaction
andcreateChild
no-op if theinstrumenter
performing the operation does not match the configured one. - Implement
SpanProcessor
- Add otel to context
- Implement
TextMapPropagator
- Allow configuring Sentry when only using the Java Agent so it's not needed in the target application
- Make sure
null
classloader (i.e. bootstrap classloader) doesn't cause issues - NoOpTransaction attaches Empty
sentry-trace
andbaggage
headers. #2376 - Add logging to
SentrySpanProcessor
,SentryPropagator
etc. - Add Sentry OTEL Java Agent to OTEL demo
- Upgrade to latest OTEL release(s)
- Add automated tests for OTEL
- Add README to
sentry-opentelemetry
modules - Use
HubAdapter
instead ofSentry
- Do not override default exporter config but rather document how to get rid of log spam if only using Sentry without OTEL exporter
- Link errors to transactions created via OTEL
- Make it possible to disable auto init in Java Agent so the target application can still use ENV vars and properties file for init without triggering auto init
Metadata
Metadata
Assignees
Labels
Projects
Status