# JBoss & WildFly OpenTelemetry Setup Guide

> Source: <https://signoz.io/docs/instrumentation/java/opentelemetry-jboss>
> Published: 2026-06-17 00:00:00+00:00

This guide walks you through instrumenting your JBoss EAP or WildFly application server with OpenTelemetry and sending traces to SigNoz. JBoss and WildFly use `standalone.conf`

(Linux/Mac) or `standalone.conf.bat`

(Windows) to configure JVM options, making it straightforward to attach the OpenTelemetry Java agent.

Prerequisites

[Java 8+](https://github.com/open-telemetry/opentelemetry-java-instrumentation)[Supported WildFly version](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/supported-libraries.md#application-servers)or compatible JBoss EAP- A SigNoz Cloud account or self-hosted SigNoz instance

Send traces to SigNoz

Step 1. Download the OpenTelemetry Java agent

```
wget -P /opt/jboss/lib/ https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar
```

Step 2. Edit standalone.conf

Open your JBoss/WildFly configuration file:

- JBoss EAP:
`/opt/jboss-eap-7.x/bin/standalone.conf`

- WildFly:
`/opt/wildfly/bin/standalone.conf`

Add the following lines:

```
JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/jboss/lib/opentelemetry-javaagent.jar"
JAVA_OPTS="$JAVA_OPTS -Dotel.service.name=<service-name>"
JAVA_OPTS="$JAVA_OPTS -Dotel.resource.attributes=service.version=<service-version>"
JAVA_OPTS="$JAVA_OPTS -Dotel.exporter.otlp.endpoint=https://ingest.<region>.signoz.cloud:443"
JAVA_OPTS="$JAVA_OPTS -Dotel.exporter.otlp.headers=signoz-ingestion-key=<your-ingestion-key>"
JAVA_OPTS="$JAVA_OPTS -Dotel.metrics.exporter=none"
JAVA_OPTS="$JAVA_OPTS -Dotel.logs.exporter=none"
```

Verify these values:

`<region>`

: Your[SigNoz Cloud region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint)`<your-ingestion-key>`

: Your SigNoz[ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/).`<service-name>`

: A descriptive name for your service (e.g.,`jboss-app`

).`<service-version>`

(optional): Your release version, image tag, or git SHA (e.g.,`1.4.2`

,`a01dbef8`

).

Set `service.version`

to a per-build value, not a static string. SigNoz detects a deployment each time this value changes. Common sources:

**Bash / shell**:`service.version=$(git rev-parse --short HEAD)`

**GitHub Actions**:`service.version=${{ github.sha }}`

**GitLab CI**:`service.version=$CI_COMMIT_SHORT_SHA`

**Kubernetes**: inject from your Helm chart image tag or CI variable

Step 3. Restart JBoss/WildFly

```
# For JBoss EAP
/opt/jboss-eap-7.x/bin/standalone.sh

# For WildFly
/opt/wildfly/bin/standalone.sh
```

Step 1. Create a Dockerfile with the agent

```
FROM jboss/wildfly:latest
WORKDIR /opt/jboss

# Download the OpenTelemetry Java agent
RUN curl -L https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar -o /opt/jboss/opentelemetry-javaagent.jar

# Copy your application
COPY target/<my-app>.war /opt/jboss/wildfly/standalone/deployments/

# Set JAVA_OPTS for OpenTelemetry
ENV JAVA_OPTS="-javaagent:/opt/jboss/opentelemetry-javaagent.jar"

EXPOSE 8080

CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0"]
```

Replace `<my-app>.war`

with your application WAR file.

Step 2. Deploy to Kubernetes

Add these environment variables to your deployment manifest:

```
env:
- name: OTEL_RESOURCE_ATTRIBUTES
  value: 'service.name=<service-name>,service.version=<service-version>'
- name: OTEL_EXPORTER_OTLP_ENDPOINT
  value: 'https://ingest.<region>.signoz.cloud:443'
- name: OTEL_EXPORTER_OTLP_HEADERS
  value: 'signoz-ingestion-key=<your-ingestion-key>'
- name: OTEL_METRICS_EXPORTER
  value: 'none'
- name: OTEL_LOGS_EXPORTER
  value: 'none'
```

Verify these values:

`<region>`

: Your[SigNoz Cloud region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint)`<your-ingestion-key>`

: Your SigNoz[ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/).`<service-name>`

: A descriptive name for your service (e.g.,`jboss-app`

).`<service-version>`

(optional): Your release version, image tag, or git SHA (e.g.,`1.4.2`

,`a01dbef8`

).

Set `service.version`

to a per-build value, not a static string. SigNoz detects a deployment each time this value changes. Common sources:

**Bash / shell**:`service.version=$(git rev-parse --short HEAD)`

**GitHub Actions**:`service.version=${{ github.sha }}`

**GitLab CI**:`service.version=$CI_COMMIT_SHORT_SHA`

**Kubernetes**: inject from your Helm chart image tag or CI variable

The [OpenTelemetry Operator](https://signoz.io/docs/opentelemetry-collection-agents/k8s/otel-operator/overview/) auto-injects the Java agent into your pods without modifying your container image.

Step 1. Set up the OpenTelemetry Operator

Install the Operator and Collector following the [K8s OTel Operator installation guide](https://signoz.io/docs/opentelemetry-collection-agents/k8s/otel-operator/install/).

Step 2. Create the Instrumentation resource

Create `instrumentation.yaml`

to configure Java auto-instrumentation:

```
apiVersion: opentelemetry.io/v1alpha1
kind: Instrumentation
metadata:
  name: java-instrumentation
spec:
  exporter:
    endpoint: http://otel-collector-collector:4318
  propagators:
    - tracecontext
    - baggage
  env:
    - name: OTEL_METRICS_EXPORTER
      value: "none"
    - name: OTEL_LOGS_EXPORTER
      value: "none"
  java:
    image: ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-java:latest
```

Deploy this resource to your cluster:

```
kubectl apply -f instrumentation.yaml
```

Step 3. Add annotations to your deployment

Add these annotations to your pod template's `metadata.annotations`

:

```
apiVersion: apps/v1
kind: Deployment
metadata:
  name: jboss-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jboss-app
  template:
    metadata:
      labels:
        app: jboss-app
      annotations:
        instrumentation.opentelemetry.io/inject-java: "true"
        resource.opentelemetry.io/service.name: "<service-name>"
        resource.opentelemetry.io/service.version: "<service-version>"
    spec:
      containers:
      - name: jboss
        image: jboss/wildfly:latest
        ports:
        - containerPort: 8080
```

Apply the deployment:

```
kubectl apply -f deployment.yaml
```

Verify these values:

`<service-name>`

: A descriptive name for your service (e.g.,`jboss-app`

).`<service-version>`

(optional): Your release version, image tag, or git SHA (e.g.,`1.4.2`

,`a01dbef8`

).

Set `service.version`

to a per-build value, not a static string. SigNoz detects a deployment each time this value changes. Common sources:

**Bash / shell**:`service.version=$(git rev-parse --short HEAD)`

**GitHub Actions**:`service.version=${{ github.sha }}`

**GitLab CI**:`service.version=$CI_COMMIT_SHORT_SHA`

**Kubernetes**: inject from your Helm chart image tag or CI variable

Step 1. Download the OpenTelemetry Java agent

```
Invoke-WebRequest -Uri "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar" -OutFile "C:\jboss\lib\opentelemetry-javaagent.jar"
```

Step 2. Edit standalone.conf.bat

Open your JBoss/WildFly configuration file:

- JBoss EAP:
`C:\jboss-eap-7.x\bin\standalone.conf.bat`

- WildFly:
`C:\wildfly\bin\standalone.conf.bat`

Add the following lines:

```
set "JAVA_OPTS=%JAVA_OPTS% -javaagent:C:\jboss\lib\opentelemetry-javaagent.jar"
set "JAVA_OPTS=%JAVA_OPTS% -Dotel.service.name=<service-name>"
set "JAVA_OPTS=%JAVA_OPTS% -Dotel.resource.attributes=service.version=<service-version>"
set "JAVA_OPTS=%JAVA_OPTS% -Dotel.exporter.otlp.endpoint=https://ingest.<region>.signoz.cloud:443"
set "JAVA_OPTS=%JAVA_OPTS% -Dotel.exporter.otlp.headers=signoz-ingestion-key=<your-ingestion-key>"
set "JAVA_OPTS=%JAVA_OPTS% -Dotel.metrics.exporter=none"
set "JAVA_OPTS=%JAVA_OPTS% -Dotel.logs.exporter=none"
```

Verify these values:

`<service-name>`

: A descriptive name for your service (e.g.,`jboss-app`

).`<service-version>`

(optional): Your release version, image tag, or git SHA (e.g.,`1.4.2`

,`a01dbef8`

).`<region>`

: Your[SigNoz Cloud region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint)`<your-ingestion-key>`

: Your SigNoz[ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/).

Set `service.version`

to a per-build value, not a static string. SigNoz detects a deployment each time this value changes. Common sources:

**Bash / shell**:`service.version=$(git rev-parse --short HEAD)`

**GitHub Actions**:`service.version=${{ github.sha }}`

**GitLab CI**:`service.version=$CI_COMMIT_SHORT_SHA`

**Kubernetes**: inject from your Helm chart image tag or CI variable

Step 3. Restart JBoss/WildFly

```
# For JBoss EAP
C:\jboss-eap-7.x\bin\standalone.bat

# For WildFly
C:\wildfly\bin\standalone.bat
```

Step 1. Create a Dockerfile

```
FROM jboss/wildfly:latest

# Download the OpenTelemetry Java agent
RUN curl -L https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/latest/download/opentelemetry-javaagent.jar -o /opt/jboss/opentelemetry-javaagent.jar

# Copy your application WAR file
COPY target/<my-app>.war /opt/jboss/wildfly/standalone/deployments/

# Set OpenTelemetry environment variables
ENV JAVA_OPTS="-javaagent:/opt/jboss/opentelemetry-javaagent.jar"
ENV OTEL_RESOURCE_ATTRIBUTES="service.name=<service-name>,service.version=<service-version>"
ENV OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.<region>.signoz.cloud:443"
ENV OTEL_EXPORTER_OTLP_HEADERS="signoz-ingestion-key=<your-ingestion-key>"
ENV OTEL_METRICS_EXPORTER="none"
ENV OTEL_LOGS_EXPORTER="none"

EXPOSE 8080

CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0"]
```

Verify these values:

`<my-app>.war`

: Your application WAR file name.`<service-name>`

: A descriptive name for your service (e.g.,`jboss-app`

).`<service-version>`

(optional): Your release version, image tag, or git SHA (e.g.,`1.4.2`

,`a01dbef8`

).`<region>`

: Your[SigNoz Cloud region](https://signoz.io/docs/ingestion/signoz-cloud/overview/#endpoint).`<your-ingestion-key>`

: Your SigNoz[ingestion key](https://signoz.io/docs/ingestion/signoz-cloud/keys/).

Set `service.version`

to a per-build value, not a static string. SigNoz detects a deployment each time this value changes. Common sources:

**Bash / shell**:`service.version=$(git rev-parse --short HEAD)`

**GitHub Actions**:`service.version=${{ github.sha }}`

**GitLab CI**:`service.version=$CI_COMMIT_SHORT_SHA`

**Kubernetes**: inject from your Helm chart image tag or CI variable

Step 2. Build and run

```
docker build -t my-jboss-app .
docker run -p 8080:8080 my-jboss-app
```

Or pass environment variables at runtime:

```
docker run -p 8080:8080 \
  -e OTEL_RESOURCE_ATTRIBUTES="service.name=my-jboss-app,service.version=<service-version>" \
  -e OTEL_EXPORTER_OTLP_ENDPOINT="https://ingest.us.signoz.cloud:443" \
  -e OTEL_EXPORTER_OTLP_HEADERS="signoz-ingestion-key=<key>" \
  -e OTEL_METRICS_EXPORTER="none" \
  -e OTEL_LOGS_EXPORTER="none" \
  my-jboss-app
```

Validate

With JBoss/WildFly running, verify traces are being sent to SigNoz:

- Deploy an application to JBoss/WildFly and make a few requests to its endpoints.
- In SigNoz, open the
**Services** tab and click**Refresh**. Your application should appear. - Go to the
**Traces** tab to see your application's traces.

Troubleshooting

[Troubleshooting](#troubleshooting)

Traces not showing up in SigNoz?

**Verify standalone.conf changes:**

Check that your `JAVA_OPTS`

modifications are being loaded:

```
ps aux | grep java | grep javaagent
```

You should see the `-javaagent`

flag in the process arguments.

**Enable debug logging:**

Add the following to `standalone.conf`

:

```
JAVA_OPTS="$JAVA_OPTS -Dotel.javaagent.debug=true"
```

Then restart JBoss and check the logs for OpenTelemetry output.

**Test connectivity:**

```
curl -v https://ingest.<region>.signoz.cloud:443/v1/traces
```

Agent not loading?

Make sure the agent JAR path is correct and the file exists:

```
ls -la /opt/jboss/lib/opentelemetry-javaagent.jar
```

Verify the path in `standalone.conf`

matches the actual location.

JBoss fails to start?

Check for syntax errors in `standalone.conf`

. Each `JAVA_OPTS`

line should be on its own line without trailing spaces or special characters.

Review the JBoss server log:

```
tail -f /opt/jboss-eap-7.x/standalone/log/server.log
```

Domain mode configuration

If running JBoss in domain mode, configure `JAVA_OPTS`

in `domain.conf`

instead of `standalone.conf`

, or set JVM options in the domain controller's host configuration.

Configuring the agent (Optional)

[Configuring the agent (Optional)](#configuring-the-agent-optional)

What can you configure?

The [OpenTelemetry Java agent](https://signoz.io/docs/instrumentation/java/opentelemetry-java/) auto-instruments most libraries out of the box. Configuration lets you fine-tune what gets captured and how traces are exported.

Why configure?

**Reduce noise**— Disable instrumentation for internal health checks or chatty libraries** Control costs**— Sample a percentage of traces instead of capturing everything** Add context**— Tag traces with environment, version, or team info for easier filtering

Common options

Add these to `standalone.conf`

:

**Disable specific instrumentations:**

```
JAVA_OPTS="$JAVA_OPTS -Dotel.instrumentation.jdbc.enabled=false"
```

**Sample traces:**

```
JAVA_OPTS="$JAVA_OPTS -Dotel.traces.sampler=parentbased_traceidratio"
JAVA_OPTS="$JAVA_OPTS -Dotel.traces.sampler.arg=0.1"  # Sample 10%
```

**Add resource attributes:**

```
JAVA_OPTS="$JAVA_OPTS -Dotel.resource.attributes=service.name=my-app,deployment.environment=production"
```

See the [full configuration reference](https://opentelemetry.io/docs/languages/java/automatic/agent-config/) for all available options.

Next steps

[Add manual instrumentation](https://signoz.io/docs/instrumentation/java/manual-instrumentation/)for custom spans and business context[Collect Java application logs](https://signoz.io/docs/logs-management/send-logs/java-logs/)with OpenTelemetry[Set up alerts](https://signoz.io/docs/setup-alerts-notification/)for your JBoss/WildFly application

**Related resources**:
