Java/Lucee, databases & other languages
Step 1: Add FusionReactor to your image
a) Create a FusionReactor directory
b) Add the FusionReactor files to the instance directory
Note
Ensure that you always use the latest version of FusionReactor.
ADD https://download.fusionreactor.io/FR/Latest/fusionreactor.jar /opt/fusionreactor/instance/{name}
ADD https://download.fusionreactor.io/FR/Latest/libfrjvmti_x64.so /opt/fusionreactor/instance/{name}
c) Add FusionReactor to the JVM arguments
Info
App servers may use different methods to do this and we advise reading their Docker Hub or consulting our repository for some examples.
ENV JAVA_OPTS="-javaagent:/opt/fusionreactor/instance/{name}/fusionreactor.jar=name=name,address=8088 -agentpath:/opt/fusionreactor/instance/{name}/libfrjvmti_x64.so"
Installing FusionReactor in Docker - Java Example from FusionReactor APM on Vimeo.
Full working example: Tomcat
FROM tomcat
ADD myApp.war /usr/local/tomcat/webapps
#Creates a FusionReactor Directory
RUN mkdir -p /opt/fusionreactor/instance/tomcat
#Adds the fusionreactor.jar file to the instance directory
ADD https://download.fusionreactor.io/FR/Latest/fusionreactor.jar /opt/fusionreactor/instance/tomcat
#Add the debug library file to the instance directory
ADD https://download.fusionreactor.io/FR/Latest/libfrjvmti_x64.so /opt/fusionreactor/instance/tomcat
#Add FusionReactor to the JVM arguments
ENV JAVA_OPTS="-javaagent:/opt/fusionreactor/instance/tomcat/fusionreactor.jar=name=tomcat,address=8088 -agentpath:/opt/fusionreactor/instance/tomcat/libfrjvmti_x64.so"
Step 2: Run the Observability Agent
The Observability Agent provides you with the necessary tools and insights to effectively monitor, manage, and optimize your applications, leading to improved reliability, performance, and user experience.
Run via Docker
Run the following command, replacing YOUR_API_KEY with your actual API key and adjusting the environment variables as needed:
docker run --env otel_collection=true --env api_key=YOUR_API_KEY --env ENV_VARIABLE=VALUE --env mysql_connection_string=root:my-secret-pw@(mysql:3306)/ intergral/observability-agent:latest
Info
Docker automatically pulls the latest version of the Observability Agent image from the Dockerhub repository.
FusionReactor Observability agent Docker installation from FusionReactor APM on Vimeo.
Learn more
Log collection and other databases can be enabled by setting the appropriate environment variables.
Run via Docker Compose
version: "3.2"
services:
#database
mysql:
image: mysql:latest
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=my-secret-pw
#agent
agent:
image: intergral/observability-agent:latest
environment:
- api_key=1234567890
- otel_collection=true
- mysql_connection_string=root:my-secret-pw@(mysql:3306)/
ports:
- 12345:12345
Learn more
Log collection and other databases can be enabled by setting the appropriate environment variables.
Step 3: Instrument OpenTelemetry
Instrument your code to support OpenTelemetry on your application (Node.js, Python, Go etc).
Learn more
Configure the endpoint of the OTel application to the Observability Agent at "otel-collector:4317" or "otel-collector:4318"of your machine (depending on whether you're using gRPC or HTTP). This ships telemetry data to the Observability Agent, which does the cloud shipping for you.
Note
It is possible to use a dedicated OTel collector or alternative if required, but the Observability Agent is the simplest method for shipping telemetry data.
Need more help?
Contact support in the chat bubble and let us know how we can assist.