Skip to main content

Java

The Java tracing library allows you to collect and monitor your Java application traces, calls, metrics, and correlation to logs.

Tracing Lambda functions#

To trace AWS Lambda functions in Java please refer to the following AWS Lambda tracing.

Installation#

Install our Java library by downloading it using curl:

curl -o epsagon-opentracing-agent-1.0.49.jar https://epsagon-java-opentracing-agent.s3.amazonaws.com/epsagon-opentracing-agent-1.0.39.jar

Setup#

To run the library as part of your application, you can use the auto-tracing.

Auto-tracing#

Auto-tracing loads the Epsagon library as part of your application. Configurations can be done through the environment variables:

export EPSAGON_TOKEN=<epsagon-token>export EPSAGON_SERVICE_NAME=<app-name-stage>java -javaagent:.<path_to_epsagon_agent> -jar <your jar file>
# For exampleexport EPSAGON_TOKEN=<your-token>export EPSAGON_SERVICE_NAME=spring-prodjava -javaagent:./epsagon-opentracing-agent-1.0.49.jar -jar app.jar

The supported frameworks and libraries are listed here.

Verification#

Now that you’ve completed the setup, you can see new traces coming up on your traces search screen. If you don't see any please refer to the FAQ section.

Further reading#

The tracing library is open source and available on GitHub. For more detailed configurations and features read about the tracing library.