# Eclipse Jersey JAX-RS 2.x

<!-- llms-txt-link: /llms.txt -->

> OpenTelemetry Java agent instrumentation

This instrumentation enriches HTTP server spans with route information, and enables controller spans for JAX-RS methods when using Jersey (controller spans are disabled by default).

- **Name**: `jaxrs-2.0-jersey-2.0`
- **Scope**: `io.opentelemetry.jaxrs-2.0-jersey-2.0`
- **Target versions**: `org.glassfish.jersey.containers:jersey-container-servlet:[2.0,3.0.0)`, `org.glassfish.jersey.core:jersey-server:[2.0,3.0.0)`
- **Library**: https://eclipse-ee4j.github.io/jersey/

## Telemetry

- **Span attributes**: `code.function`, `code.namespace`, `jaxrs.canceled`

## Configuration

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `otel.instrumentation.common.experimental.controller-telemetry.enabled` | boolean | false | Enables the creation of experimental controller spans. |
| `otel.instrumentation.jaxrs.experimental-span-attributes` | boolean | false | Enables the experimental `jaxrs.canceled` span attribute. |

## Data

- **JSON**: [/data/javaagent/instrumentations/jaxrs-2.0-jersey-2.0/jaxrs-2.0-jersey-2.0-14d542ebc394.json](/data/javaagent/instrumentations/jaxrs-2.0-jersey-2.0/jaxrs-2.0-jersey-2.0-14d542ebc394.json)
- **Explore**: [/java-agent/instrumentation/jaxrs-2.0-jersey-2.0](/java-agent/instrumentation/jaxrs-2.0-jersey-2.0)
