Skip to main content
Please follow the installation guide first, when adding a new application to AppSignal. Then make sure to install the AppSignal collector before proceeding. To install and configure OpenTelemetry for your Java application, we recommend using the OpenTelemetry Java agent to export data to the AppSignal collector. This agent will automatically instrument your application.

Download the OpenTelemetry Java agent

Download the OpenTelemetry Java agent from the latest release on Github. When running your application, the OpenTelemetry Java agent will need to be present.

Run your application with the agent

When running your application, you will need to configure the Java runtime to load the OpenTelemetry Java agent. Change how you start your application to load the OpenTelemetry Java agent with your application:
Replace /path/to/opentelemetry-javaagent.jar with the path to the downloaded agent and your-application.jar with the path to your application’s JAR file.

Gradle

When using Gradle, you can add the agent to the task that starts your application in the build.gradle file:

Configure the agent

The agent may be configured using Java properties or environment variables. We recommend using environment variables for configuration. First, configure the agent to export traces and logs to the AppSignal collector:
Then, configure the OpenTelemetry resource attributes required by AppSignal:

Test the app!

Now that all the components are connected, start your app with the required environment variables and test if you see data arrive in AppSignal. Check the “Errors > Issue list” and “Performance > Traces” page specifically. If after following our installation instructions you still don’t see data in AppSignal, let us know and we’ll help you finalize your OpenTelemetry installation!