Installation of the Java agent on application servers


TL;DR

Most application servers understand the JAVA_OPTS environment variable.

Download the agent

$ curl https://download.sqreen.io/java/sqreen-latest-all.jar -o sqreen-latest-all.jar

Set the JAVA_OPTS environment variable and make sure it is resolved each time the Java server is restarted:

export JAVA_OPTS="${JAVA_OPTS} -javaagent:/path/to/agent.jar -Dsqreen.token=<your Sqreen token>"

Then launch the application as usual.

Basic configuration

Instead of using the system property value (-D flag), you can also use SQREEN_TOKEN environment variable to set up your token:

export SQREEN_TOKEN=mysecrettoken

Sqreen Java agent provides flexible configuration settings. Refer to the Configuration section for more detailed information.

Uninstall the agent

To uninstall the Sqreen agent, simply remove the JAVA_OPTS export.

Notes

Use different Sqreen Applications for different environments

We recommend you to use different Sqreen applications on your different environments: Production, Staging and Development.