# Undertow

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

> OpenTelemetry Java agent instrumentation

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

- **Name**: `undertow-1.4`
- **Scope**: `io.opentelemetry.undertow-1.4`
- **Target versions**: `io.undertow:undertow-core:[1.4.0.Final,)`
- **Library**: https://undertow.io/

## Telemetry

- **Metrics**: `http.server.request.duration`
- **Span attributes**: `client.address`, `error.type`, `http.request.method`, `http.request.method_original`, `http.response.status_code`, `network.peer.address`, `network.peer.port`, `network.protocol.version`, `server.address`, `server.port`, `url.path`, `url.query`, `url.scheme`, `user_agent.original`

## 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**: [/data/javaagent/instrumentations/undertow-1.4/undertow-1.4-1eb016ea530d.json](/data/javaagent/instrumentations/undertow-1.4/undertow-1.4-1eb016ea530d.json)
- **Explore**: [/java-agent/instrumentation/undertow-1.4](/java-agent/instrumentation/undertow-1.4)
