Get a DemoStart Free TrialSign In

OpenTelemetry Java Configuration

Ship traces from Java to Opensearch with OpenTelemetry (via gRPC)

Use OpenTelemetry to easily send Java traces to your Logit.io Stack.

Send Your DataAPMLanguages & LibrariesOpenTelemetry Java Configuration Guide

Follow this step by step guide to get 'traces' from your system to Logit.io:

Step 1 - Getting Started

To automatically instrument your Java application and send traces to your Logit.io Stack you just need to ensure the Environment variables or system properties are added correctly.

The full list of environment variable and system property names can be found here. The variables that need to be updated to allow the traces to be sent to your Logit.io Stack are shown below. Be sure to update the path to the location of the OpenTelemetry javaagent jar file and set your service name.

Environment Variables

JAVA_TOOL_OPTIONS = -javaagent:path/to/jar/file/opentelemetry-javaagent.jar
OTEL_TRACES_EXPORTER = otlp
OTEL_EXPORTER_OTLP_ENDPOINT = https://<your-opentelemetry-endpoint-address>:<your-opentelemetry-endpoint-port>
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL = <your-opentelemetry-protocol>
OTEL_EXPORTER_OTLP_TRACES_HEADERS = Authorization=Basic <your-encoded-opentelemetry-auth-header-value>

Java system properties (can be provided as arguments when running the Java application)

-javaagent:path/to/jar/file/opentelemetry-javaagent.jar
otel.service.name=<your-service-name>
otel.traces.exporter=otlp
otel.exporter.otlp.endpoint=https://<your-opentelemetry-endpoint-address>:<your-opentelemetry-endpoint-port>
otel.exporter.otlp.traces.protocol=<your-opentelemetry-protocol>
otel.exporter.otlp.traces.headers=Authorization=Basic <your-encoded-opentelemetry-auth-header-value>

Step 2 - Check Logit.io for your traces

Data should now have been sent to your Stack.

View my data

If you don't see traces please take a look at How to diagnose no data in Stack below for how to diagnose common issues.

Step 3 - how to diagnose no data in Stack

If you don't see data appearing in your Stack after following the steps, visit the Help Centre guide for steps to diagnose no data appearing in your Stack or Chat to support now.

Return to Search
Sign Up

© 2024 Logit.io Ltd, All rights reserved.