Enrich with OpenTelemetry APIs
Java
Required dependencies
Add the following dependencies to your project:
Creating Spans
To create a span, use the Tracer
interface. The Tracer
interface is the main entry point for the OpenTelemetry API. It allows you to create spans and manage the current span.
Acquire a Tracer
instance using the OpenTelemetry
class:
Now you can create a span using the Tracer
instance:
Additional information
For more use cases, see the OpenTelemetry Java API documentation.