# Eclipse Jetty

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

> OpenTelemetry Java agent instrumentation

This instrumentation enables HTTP server spans and HTTP server metrics for Jetty.

- **Name**: `jetty-12.0`
- **Scope**: `io.opentelemetry.jetty-12.0`
- **Target versions**: `org.eclipse.jetty:jetty-server:[12,)`
- **Library**: https://eclipse.dev/jetty/

## Telemetry

### When `default`

**Metrics**

| Metric | Instrument | Type | Unit | Description |
| --- | --- | --- | --- | --- |
| `http.server.request.duration` | histogram | HISTOGRAM | s | Duration of HTTP server requests. |

| Metric | Attributes |
| --- | --- |
| `http.server.request.duration` | `http.request.method` (STRING), `http.response.status_code` (LONG), `network.protocol.version` (STRING), `url.scheme` (STRING) |

**Spans**

| Span kind | Attributes |
| --- | --- |
| SERVER | `client.address` (STRING), `error.type` (STRING), `http.request.method` (STRING), `http.request.method_original` (STRING), `http.response.status_code` (LONG), `network.peer.address` (STRING), `network.peer.port` (LONG), `network.protocol.version` (STRING), `server.address` (STRING), `server.port` (LONG), `url.path` (STRING), `url.query` (STRING), `url.scheme` (STRING), `user_agent.original` (STRING) |

## Configuration

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `otel.instrumentation.http.known-methods` | list | CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE | Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`. |
| `otel.instrumentation.http.server.capture-request-headers` | list |  | List of HTTP request headers to capture in HTTP server telemetry. |
| `otel.instrumentation.http.server.capture-response-headers` | list |  | List of HTTP response headers to capture in HTTP server telemetry. |
| `otel.instrumentation.http.server.emit-experimental-telemetry` | boolean | false | Enable the capture of experimental HTTP server telemetry. Adds the `http.request.body.size` and `http.response.body.size` attributes to spans, and records `http.server.request.body.size` and `http.server.response.body.size` metrics. |

## Data

- **JSON (latest)**: [/data/javaagent/instrumentations/jetty-12.0/latest.json](/data/javaagent/instrumentations/jetty-12.0/latest.json)
- **JSON (pinned)**: [/data/javaagent/instrumentations/jetty-12.0/jetty-12.0-6e44982bb5a9.json](/data/javaagent/instrumentations/jetty-12.0/jetty-12.0-6e44982bb5a9.json)
- **Explore**: [/java-agent/instrumentation/jetty-12.0](/java-agent/instrumentation/jetty-12.0)
