Have you considered using the Lumigo OpenTelemetry Distro for Java?
The Lumigo OpenTelemetry Distro for Java is built on top of the OpenTelemetry Java SDK and the OpenTelemetry Java Agent, adding a number of functionalities from the opentelemetry-java-contrib repository, together with a lot of additional automation, no-code capabilities and automated quality-assurance.
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.
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.
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 2 months ago