# Pekko HTTP

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

> OpenTelemetry Java agent instrumentation

This instrumentation enables HTTP client spans and metrics for the Pekko HTTP client, and HTTP server spans and metrics for the Pekko HTTP server.

- **Name**: `pekko-http-1.0`
- **Scope**: `io.opentelemetry.pekko-http-1.0`
- **Target versions**: `com.softwaremill.sttp.tapir:tapir-pekko-http-server_2.12:[1.7,)`, `com.softwaremill.sttp.tapir:tapir-pekko-http-server_2.13:[1.7,)`, `com.softwaremill.sttp.tapir:tapir-pekko-http-server_3:[1.7,)`, `org.apache.pekko:pekko-http_2.12:[1.0,)`, `org.apache.pekko:pekko-http_2.13:[1.0,)`, `org.apache.pekko:pekko-http_3:[1.0,)`
- **Library**: https://pekko.apache.org/docs/pekko-http/current/index.html

## Telemetry

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

## Configuration

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `otel.instrumentation.common.peer-service-mapping` | map |  | Used to specify a mapping from host names or IP addresses to peer services. |
| `otel.instrumentation.http.client.capture-request-headers` | list |  | List of HTTP request headers to capture in HTTP client telemetry. |
| `otel.instrumentation.http.client.capture-response-headers` | list |  | List of HTTP response headers to capture in HTTP client telemetry. |
| `otel.instrumentation.http.client.emit-experimental-telemetry` | boolean | false | Enable the capture of experimental HTTP client telemetry. Adds the `http.request.body.size` and `http.response.body.size` attributes to spans, and records `http.client.request.body.size` and `http.client.response.body.size` metrics. |
| `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. |
| `java.common.http.client.url_template_rules` | list |  | Rules for deriving low-cardinality URL templates (routes) from HTTP client request URLs. Only applied when experimental HTTP client telemetry is enabled. |
| `otel.instrumentation.sanitization.url.experimental.sensitive-query-parameters` | list | AWSAccessKeyId,Signature,sig,X-Goog-Signature | List of URL query parameter names whose values are redacted in URL attributes. See https://opentelemetry.io/docs/specs/semconv/http/http-spans. |

## Data

- **JSON**: [/data/javaagent/instrumentations/pekko-http-1.0/pekko-http-1.0-b481e88dd2f4.json](/data/javaagent/instrumentations/pekko-http-1.0/pekko-http-1.0-b481e88dd2f4.json)
- **Explore**: [/java-agent/instrumentation/pekko-http-1.0](/java-agent/instrumentation/pekko-http-1.0)
