Skip to content

Java SDK basic OTEL Support #2327

@adinauer

Description

@adinauer

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:

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions