AppSignal for Java
Java Custom Instrumentation
AppSignal is compatible with OpenTelemetry instrumentation packages.
Some of these instrumentation packages may require additional setup.
These instrumentations do not not always include all the information you need to debug issues.
For more fine-grained reporting, you can add custom instrumentation.
We support OpenTelemetry tracing as laid out in the OpenTelemetry documentation.
It’s possible to add more data to span using OpenTelemetry span attributes.
There are also AppSignal span attributes that can change how traces are grouped and some attributes that allow for filtering out sensitive data.
Note: In these examples we’re using the global tracer provider set by OpenTelemetry. You may want to inject the tracer into your classes for better testability.
Note: This will only return a span if one is already active.
More ways to create and get spans are documented on the OpenTelemetry Java Instrumentation page.
See our guides for more information on what custom AppSignal attributes are supported: