Ratpack
OpenTelemetry Java agent instrumentation
This instrumentation enriches HTTP server spans with route information, enables controller spans for Ratpack handlers (controller spans are disabled by default), and enables HTTP client spans and HTTP client metrics for Ratpack 1.7 and later.
- Name:
ratpack-1.4 - Scope:
io.opentelemetry.ratpack-1.4 - Target versions:
io.ratpack:ratpack-core:[1.4.0,) - Library: https://ratpack.io/
Telemetry
When otel.instrumentation.common.controller-telemetry.enabled=true
Metrics
| Metric | Instrument | Type | Unit | Description |
|---|---|---|---|---|
http.client.request.duration | histogram | HISTOGRAM | s | Duration of HTTP client requests. |
| Metric | Attributes |
|---|---|
http.client.request.duration | http.request.method (STRING), http.response.status_code (LONG), network.protocol.version (STRING), server.address (STRING), server.port (LONG) |
Spans
| Span kind | Attributes |
|---|---|
| CLIENT | error.type (STRING), http.request.method (STRING), http.request.method_original (STRING), http.response.status_code (LONG), http.route (STRING), network.protocol.version (STRING), peer.service (STRING), server.address (STRING), server.port (LONG), url.full (STRING) |
| INTERNAL |
When otel.instrumentation.common.v3-preview=true,otel.instrumentation.common.controller-telemetry.enabled=true
Metrics
| Metric | Instrument | Type | Unit | Description |
|---|---|---|---|---|
http.client.request.duration | histogram | HISTOGRAM | s | Duration of HTTP client requests. |
| Metric | Attributes |
|---|---|
http.client.request.duration | http.request.method (STRING), http.response.status_code (LONG), network.protocol.version (STRING), server.address (STRING), server.port (LONG) |
Spans
| Span kind | Attributes |
|---|---|
| CLIENT | http.request.method (STRING), http.response.status_code (LONG), http.route (STRING), network.protocol.version (STRING), peer.service (STRING), server.address (STRING), server.port (LONG), url.full (STRING) |
When otel.semconv-stability.opt-in=service.peer
Metrics
| Metric | Instrument | Type | Unit | Description |
|---|---|---|---|---|
http.client.request.duration | histogram | HISTOGRAM | s | Duration of HTTP client requests. |
| Metric | Attributes |
|---|---|
http.client.request.duration | http.request.method (STRING), http.response.status_code (LONG), network.protocol.version (STRING), server.address (STRING), server.port (LONG) |
Spans
| Span kind | Attributes |
|---|---|
| CLIENT | error.type (STRING), http.request.method (STRING), http.request.method_original (STRING), http.response.status_code (LONG), http.route (STRING), network.protocol.version (STRING), server.address (STRING), server.port (LONG), service.peer.name (STRING), url.full (STRING) |
| INTERNAL |
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
otel.instrumentation.common.controller-telemetry.enabled | boolean | false | Enables the creation of experimental controller spans. |
otel.instrumentation.common.experimental.controller-telemetry.enabled | boolean | false | Deprecated: use otel.instrumentation.common.controller-telemetry.enabled instead. This setting is ignored under v3-preview and will be removed in 3.0. |
otel.instrumentation.common.peer-service-mapping | map | Used to specify a mapping from server addresses or configured targets to peer services. Configured targets containing commas or equals signs can only be mapped with declarative service_peer_mapping. | |
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. |
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,X-Amz-Signature,X-Amz-Credential,X-Amz-Security-Token,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. |