Documentation forSolarWinds Observability

Java Library instrumentation SDK

The SolarWinds Observability Java Library is a custom distro based on the OpenTelemetry Java agent, and therefore supports the standard OpenTelemetry API. You can use the standard API to manually instrument your applications.

To create a trace manually, get the auto-configured global OpenTelemetry object. Create a Tracer from the OpenTelemetry object, then create a Span from the Tracer.

Here is a simple example:

// get the auto-configured global OpenTelemetry object 

OpenTelemetry openTelemetry = GlobalOpenTelemetry.get(); 

// get a tracer object from the OpenTelemetry object 
Tracer tracer = openTelemetry.getTracer("instrumentation-library-name", "1.0.0"); 

// create a span 
Span span = tracer.spanBuilder("mySpan”).startSpan(); 

// do some real work; 

// end the span  

The SolarWinds Observability APM OpenTelemetry extensions are automatically hooked into the auto-configured global OpenTelemetry object when the application starts up. You do not need to create your own OpenTelemetry object.

If you create and use a different OpenTelemetry object, the manual instrumentation spans will not be recognized by the SolarWinds Observability APM extensions or received by the SolarWinds APM collector.

See Manual Instrumentation in OpenTelemetry documentation for more ways to use the API.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.