Thundra APM
Search…
Deployment Integrations
Integration Options for Java SDK in Containers and VMs

Download the Agent

Download the latest Thundra agent from the Thundra repo.

Configure the Agent

In order to configure the agent, you'll need an API key from Thundra APM.

Configure by Environment Variable

The Thundra agent can be configured externally through environment variables:
  • Configure the Thundra API key by setting the THUNDRA_APIKEY environment variable.
  • Configure application name by setting the THUNDRA_AGENT_APPLICATION_NAME environment variable.
So, a sample configuration will look like this:
1
export THUNDRA_APIKEY=<YOUR-THUNDRA-API-KEY>
2
export THUNDRA_AGENT_APPLICATION_NAME=user-service
Copied!

Configure by YAML format

Thundra agent can be configured through a YAML formatted configuration file named thundra-config.yml in the classpath (for example the config file might be located under src/main/resources directory):
  • Configure the Thundra API key by setting the thundra.apiKey YAML key.
  • Configure the application name by setting thethundra.agent.application.name YAML key.
So, a sample configuration file thundra-config.yml will look like this:
1
thundra:
2
apiKey: <YOUR-THUNDRA-API-KEY>
3
agent:
4
application:
5
name: user-service
6
Copied!

Sample Docker Configuration

Here you can see a sample Docker configuration. It may differ from your own Docker configuration. You need to modify this sample according to your own Docker configuration.
1
FROM openjdk:8
2
RUN mkdir -p /app
3
4
# Copy app artifact
5
ADD target/<Your-App>.jar /app/<Your-App>.jar
6
7
# Copy Thundra bootstrap agent artifact.
8
# Please rename with the file you have downloaded at the first step.
9
ADD thundra-agent-bootstrap.jar /app/thundra-agent-bootstrap.jar
10
11
WORKDIR /app
12
EXPOSE 8080
13
ENTRYPOINT [ "java", "-javaagent:thundra-agent-bootstrap.jar", "-jar", "<Your-App>.jar" ]
Copied!
You can use the example below if you would like to use environment variables with docker run
1
docker run ... \
2
-e THUNDRA_APIKEY=<YOUR-THUNDRA-API-KEY> \
3
-e THUNDRA_AGENT_APPLICATION_NAME=<YOUR-APP-NAME> \
4
...
Copied!

Add Thundra to Your Application

Run the following command to add Thundra to your application.
1
java -javaagent:<path-to-thundra-agent> -jar <your-app-jar> ...
Copied!
Last modified 1mo ago