From 0c7c2e936bff963927d3778dc5bf3a0783cb4563 Mon Sep 17 00:00:00 2001 From: Jay DeLuca Date: Thu, 6 Nov 2025 16:21:20 -0500 Subject: [PATCH] Update AsyncHttpClient metadata --- docs/instrumentation-list.yaml | 88 ++++++++++++++++++- instrumentation-docs/instrumentations.sh | 1 + .../async-http-client-1.8/metadata.yaml | 38 +++++++- .../async-http-client-1.9/metadata.yaml | 5 +- .../async-http-client-2.0/metadata.yaml | 5 +- 5 files changed, 130 insertions(+), 7 deletions(-) diff --git a/docs/instrumentation-list.yaml b/docs/instrumentation-list.yaml index 383f58e78825..3b0522e14b20 100644 --- a/docs/instrumentation-list.yaml +++ b/docs/instrumentation-list.yaml @@ -1170,9 +1170,88 @@ libraries: - name: server.port type: LONG async: + - name: async-http-client-1.8 + display_name: AsyncHttpClient + description: | + This instrumentation enables HTTP client spans and HTTP client metrics for the AsyncHttpClient HTTP client. + semantic_conventions: + - HTTP_CLIENT_SPANS + - HTTP_CLIENT_METRICS + library_link: https://github.com/AsyncHttpClient/async-http-client + source_path: instrumentation/async-http-client/async-http-client-1.8 + scope: + name: io.opentelemetry.async-http-client-1.8 + schema_url: https://opentelemetry.io/schemas/1.37.0 + target_versions: + javaagent: + - com.ning:async-http-client:[1.8.0,1.9.0) + configurations: + - name: otel.instrumentation.http.known-methods + description: | + Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`. + type: list + default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE + - name: otel.instrumentation.http.client.capture-request-headers + description: List of HTTP request headers to capture in HTTP client telemetry. + type: list + default: '' + - name: otel.instrumentation.http.client.capture-response-headers + description: List of HTTP response headers to capture in HTTP client telemetry. + type: list + default: '' + - name: otel.instrumentation.common.peer-service-mapping + description: Used to specify a mapping from host names or IP addresses to peer + services. + type: map + default: '' + - name: otel.instrumentation.http.client.emit-experimental-telemetry + description: | + 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.size` and `http.client.response.size` metrics. + type: boolean + default: false + - name: otel.instrumentation.http.client.experimental.redact-query-parameters + description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans. + type: boolean + default: true + telemetry: + - when: default + metrics: + - name: http.client.request.duration + description: Duration of HTTP client requests. + type: HISTOGRAM + unit: s + attributes: + - name: http.request.method + type: STRING + - name: http.response.status_code + type: LONG + - name: server.address + type: STRING + - name: server.port + type: LONG + spans: + - span_kind: CLIENT + attributes: + - name: error.type + type: STRING + - name: http.request.method + type: STRING + - name: http.request.method_original + type: STRING + - name: http.response.status_code + type: LONG + - name: peer.service + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG + - name: url.full + type: STRING - name: async-http-client-1.9 - description: This instrumentation enables HTTP client spans and HTTP client metrics - for version 1 of the AsyncHttpClient (AHC) HTTP client. + display_name: AsyncHttpClient + description: | + This instrumentation enables HTTP client spans and HTTP client metrics for the AsyncHttpClient HTTP client. semantic_conventions: - HTTP_CLIENT_SPANS - HTTP_CLIENT_METRICS @@ -1248,8 +1327,9 @@ libraries: - name: url.full type: STRING - name: async-http-client-2.0 - description: This instrumentation enables HTTP client spans and HTTP client metrics - for version 2 of the AsyncHttpClient (AHC) HTTP client. + display_name: AsyncHttpClient + description: | + This instrumentation enables HTTP client spans and HTTP client metrics for the AsyncHttpClient HTTP client. semantic_conventions: - HTTP_CLIENT_SPANS - HTTP_CLIENT_METRICS diff --git a/instrumentation-docs/instrumentations.sh b/instrumentation-docs/instrumentations.sh index b7c01a70b913..bb624ca1a48c 100755 --- a/instrumentation-docs/instrumentations.sh +++ b/instrumentation-docs/instrumentations.sh @@ -22,6 +22,7 @@ readonly INSTRUMENTATIONS=( "apache-httpclient:apache-httpclient-5.2:library:test" "armeria:armeria-1.3:javaagent:test" "armeria:armeria-grpc-1.14:javaagent:test" + "async-http-client:async-http-client-1.8:javaagent:test" "async-http-client:async-http-client-1.9:javaagent:test" "async-http-client:async-http-client-2.0:javaagent:test" "aws-lambda:aws-lambda-core-1.0:javaagent:test" diff --git a/instrumentation/async-http-client/async-http-client-1.8/metadata.yaml b/instrumentation/async-http-client/async-http-client-1.8/metadata.yaml index 023f7bb6185b..3350265dee14 100644 --- a/instrumentation/async-http-client/async-http-client-1.8/metadata.yaml +++ b/instrumentation/async-http-client/async-http-client-1.8/metadata.yaml @@ -1,2 +1,38 @@ -description: This instrumentation enables HTTP client spans and HTTP client metrics for version 1.8 of the AsyncHttpClient (AHC) HTTP client. +display_name: AsyncHttpClient +description: > + This instrumentation enables HTTP client spans and HTTP client metrics for the AsyncHttpClient + HTTP client. library_link: https://github.com/AsyncHttpClient/async-http-client +semantic_conventions: + - HTTP_CLIENT_SPANS + - HTTP_CLIENT_METRICS +configurations: + - name: otel.instrumentation.http.known-methods + description: > + Configures the instrumentation to recognize an alternative set of HTTP request methods. All + other methods will be treated as `_OTHER`. + type: list + default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE" + - name: otel.instrumentation.http.client.capture-request-headers + description: List of HTTP request headers to capture in HTTP client telemetry. + type: list + default: "" + - name: otel.instrumentation.http.client.capture-response-headers + description: List of HTTP response headers to capture in HTTP client telemetry. + type: list + default: "" + - name: otel.instrumentation.common.peer-service-mapping + description: Used to specify a mapping from host names or IP addresses to peer services. + type: map + default: "" + - name: otel.instrumentation.http.client.emit-experimental-telemetry + description: > + 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.size` and + `http.client.response.size` metrics. + type: boolean + default: false + - name: otel.instrumentation.http.client.experimental.redact-query-parameters + description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans. + type: boolean + default: true diff --git a/instrumentation/async-http-client/async-http-client-1.9/metadata.yaml b/instrumentation/async-http-client/async-http-client-1.9/metadata.yaml index 636bfd91269b..3350265dee14 100644 --- a/instrumentation/async-http-client/async-http-client-1.9/metadata.yaml +++ b/instrumentation/async-http-client/async-http-client-1.9/metadata.yaml @@ -1,4 +1,7 @@ -description: This instrumentation enables HTTP client spans and HTTP client metrics for version 1.9 of the AsyncHttpClient (AHC) HTTP client. +display_name: AsyncHttpClient +description: > + This instrumentation enables HTTP client spans and HTTP client metrics for the AsyncHttpClient + HTTP client. library_link: https://github.com/AsyncHttpClient/async-http-client semantic_conventions: - HTTP_CLIENT_SPANS diff --git a/instrumentation/async-http-client/async-http-client-2.0/metadata.yaml b/instrumentation/async-http-client/async-http-client-2.0/metadata.yaml index f6b0d23af87f..3350265dee14 100644 --- a/instrumentation/async-http-client/async-http-client-2.0/metadata.yaml +++ b/instrumentation/async-http-client/async-http-client-2.0/metadata.yaml @@ -1,4 +1,7 @@ -description: This instrumentation enables HTTP client spans and HTTP client metrics for version 2 of the AsyncHttpClient (AHC) HTTP client. +display_name: AsyncHttpClient +description: > + This instrumentation enables HTTP client spans and HTTP client metrics for the AsyncHttpClient + HTTP client. library_link: https://github.com/AsyncHttpClient/async-http-client semantic_conventions: - HTTP_CLIENT_SPANS