OpenTelemetry Java Agent
The steps to make the OpenTelemetry Java Agent report tracing data to Lumigo are a mix of adding the OpenTelemetry Java agent at runtime and environment-based configuration.
This documentation does not cover how to add instrumentation to your Python code, but pointers are provided in the "What's Next" section at the end of the page.
Add the Java agent
The OpenTelemetry Java Instrumentation project makes available a Java agent that automatically instruments Java applications. The latest release is available in the GitHub releases, as the
Adding the OpenTelemetry Java Agent to a Java application requires passing the
-javaagent:<path/to/opentelemetry-javaagent.jar> as a startup parameter. For example, if you want to run the
app.jar executable JAR file and your agent file is available at
/opt/opentelemetry/java/opentelemetry-javaagent.jar, the startup parameters would look like:
java -javaagent:opentelemetry-javaagent.jar -jar app.jar
Mind the order of parameters!
-javaagentparameter must be specified before
With the OpenTelemetry Java Agent added at startup to your application, the nest step is to configure it via environment variables.
Configure the OpenTelemetry Java Agent
The OpenTelemetry OTLP Exporters package of the OpenTelemetry Python SDK can be connected to Lumigo using the following environment variables:
|Not setting this variable will prevent tracing data to be reported to Lumigo!|
<token> with your Lumigo token, which is available in
Settings -> Tracing -> Manual tracing, see the Lumigo Tokens documentation.
Resource Attributes are very important!
When you instantiate the
TracerProvider, you can pass it a
Resource, which contains attributes that describe the your Python application and the platform on which it runs. See the Supported Semantic Conventions page for a list of endorsed Resource Detectors that will provide data useful for your experience of using Lumigo.
Updated 6 months ago