This guide provides step-by-step instructions for setting up OpenTelemetry (OTel) instrumentation in your JBoss applications to enable comprehensive observability. OpenTelemetry is an open-source framework that helps you collect telemetry data—such as traces, metrics, and logs—from your app to monitor its performance and health.
Once your telemetry data is captured, you can configure an exporter to send it directly to Atatus for advanced monitoring and insights.
The process of setting up OpenTelemetry in JBoss involves three key steps:
Instrumenting Your JBoss Application: Add the necessary OpenTelemetry components to your JBoss app for trace and metric collection.
Configuring the Exporter: Set up the exporter to send your telemetry data to Atatus.
Validating the Setup: Verify that the configuration is working and that your data is being correctly sent to Atatus.
Requirements
- Java 8 or newer
Sending Telemetry Data to Atatus in Two Ways
Send Telemetry Traces to Atatus
Send Traces Using the OTel Collector Binary
Send Telemetry Traces to Atatus
Download otel java binary agent
wget https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
Open the configuration file
vim /opt/jboss-eap-7.1/bin/standalone.conf
Update the
JAVA_OPTS
environment variable with the necessary configurations to send data to the Atatus cloud in your configuration fileJAVA_OPTS="-javaagent:/path/opentelemetry-javaagent.jar -Dotel.exporter.otlp.endpoint="https://otel-rx.atatus.com" -Dotel.exporter.otlp.headers="api-key=<ATATUS_INGESTION_KEY>" -Dotel.resource.attributes="service.name=<app_name>""
You can get the ATATUS_INGESTION_KEY
from Settings -> Account Settings -> API Keys in Atatus dashboard.
Send Traces Using the OTel Collector Binary
To collect and send traces to Atatus, it's recommended to install the OpenTelemetry (OTel) Collector binary. The OTel Collector helps gather logs, host metrics, resource, and infrastructure attributes, enabling richer contextual data and easier signal correlation.
For detailed instructions on setting up the OTel Collector binary on your VM, please refer to the official installation guide. Once the Collector is up and running, you can proceed with instrumenting your Java application to start sending telemetry data to Atatus.
Download otel java binary agent
wget https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
Open the configuration file
vim /opt/jboss-eap-7.1/bin/standalone.conf
Update the
JAVA_OPTS
environment variable with the necessary configurations to send data to the Atatus cloud in your configuration fileJAVA_OPTS="-javaagent:/path/opentelemetry-javaagent.jar"