Skip to content

Commit a5bd342

Browse files
authored
OkHTTP Openai UCP and OSHI metadata updates (#15549)
1 parent 9372443 commit a5bd342

File tree

8 files changed

+177
-16
lines changed

8 files changed

+177
-16
lines changed

docs/instrumentation-list.yaml

Lines changed: 86 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9128,13 +9128,47 @@ libraries:
91289128
type: STRING
91299129
okhttp:
91309130
- name: okhttp-2.2
9131+
display_name: OkHttp
9132+
description: This instrumentation enables HTTP client spans and HTTP client metrics
9133+
for OkHttp.
9134+
semantic_conventions:
9135+
- HTTP_CLIENT_SPANS
9136+
- HTTP_CLIENT_METRICS
91319137
source_path: instrumentation/okhttp/okhttp-2.2
91329138
scope:
91339139
name: io.opentelemetry.okhttp-2.2
91349140
schema_url: https://opentelemetry.io/schemas/1.37.0
91359141
target_versions:
91369142
javaagent:
91379143
- com.squareup.okhttp:okhttp:[2.2,3)
9144+
configurations:
9145+
- name: otel.instrumentation.http.known-methods
9146+
description: |
9147+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
9148+
type: list
9149+
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
9150+
- name: otel.instrumentation.http.client.capture-request-headers
9151+
description: List of HTTP request headers to capture in HTTP client telemetry.
9152+
type: list
9153+
default: ''
9154+
- name: otel.instrumentation.http.client.capture-response-headers
9155+
description: List of HTTP response headers to capture in HTTP client telemetry.
9156+
type: list
9157+
default: ''
9158+
- name: otel.instrumentation.common.peer-service-mapping
9159+
description: Used to specify a mapping from host names or IP addresses to peer
9160+
services.
9161+
type: map
9162+
default: ''
9163+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
9164+
description: |
9165+
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.
9166+
type: boolean
9167+
default: false
9168+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
9169+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
9170+
type: boolean
9171+
default: true
91389172
telemetry:
91399173
- when: default
91409174
metrics:
@@ -9175,6 +9209,13 @@ libraries:
91759209
- name: url.full
91769210
type: STRING
91779211
- name: okhttp-3.0
9212+
display_name: OkHttp
9213+
description: This instrumentation enables HTTP client spans and HTTP client metrics
9214+
for OkHttp.
9215+
semantic_conventions:
9216+
- HTTP_CLIENT_SPANS
9217+
- HTTP_CLIENT_METRICS
9218+
library_link: https://square.github.io/okhttp/
91789219
source_path: instrumentation/okhttp/okhttp-3.0
91799220
scope:
91809221
name: io.opentelemetry.okhttp-3.0
@@ -9184,6 +9225,34 @@ libraries:
91849225
- com.squareup.okhttp3:okhttp:[3.0,)
91859226
library:
91869227
- com.squareup.okhttp3:okhttp:3.0.0
9228+
configurations:
9229+
- name: otel.instrumentation.http.known-methods
9230+
description: |
9231+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
9232+
type: list
9233+
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
9234+
- name: otel.instrumentation.http.client.capture-request-headers
9235+
description: List of HTTP request headers to capture in HTTP client telemetry.
9236+
type: list
9237+
default: ''
9238+
- name: otel.instrumentation.http.client.capture-response-headers
9239+
description: List of HTTP response headers to capture in HTTP client telemetry.
9240+
type: list
9241+
default: ''
9242+
- name: otel.instrumentation.common.peer-service-mapping
9243+
description: Used to specify a mapping from host names or IP addresses to peer
9244+
services.
9245+
type: map
9246+
default: ''
9247+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
9248+
description: |
9249+
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.
9250+
type: boolean
9251+
default: false
9252+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
9253+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
9254+
type: boolean
9255+
default: true
91879256
telemetry:
91889257
- when: default
91899258
metrics:
@@ -9231,8 +9300,12 @@ libraries:
92319300
type: STRING
92329301
openai:
92339302
- name: openai-java-1.1
9303+
display_name: OpenAI Java SDK
92349304
description: This instrumentation enables Gen AI client spans and metrics for
9235-
OpenAI Java SDK 1.1+.
9305+
the OpenAI Java SDK.
9306+
semantic_conventions:
9307+
- GENAI_CLIENT_SPANS
9308+
- GENAI_CLIENT_METRICS
92369309
library_link: https://github.com/openai/openai-java
92379310
source_path: instrumentation/openai/openai-java-1.1
92389311
scope:
@@ -9464,8 +9537,11 @@ libraries:
94649537
type: STRING
94659538
oracle:
94669539
- name: oracle-ucp-11.2
9467-
description: The Oracle Universal Connection Pool (UCP) instrumentation generates
9468-
connection pool metrics.
9540+
display_name: Oracle UCP
9541+
description: |
9542+
The Oracle Universal Connection Pool (UCP) instrumentation enables database connection pool metrics for Oracle UCP data sources.
9543+
semantic_conventions:
9544+
- DATABASE_POOL_METRICS
94699545
library_link: https://docs.oracle.com/database/121/JJUCP/
94709546
source_path: instrumentation/oracle-ucp-11.2
94719547
scope:
@@ -9532,9 +9608,11 @@ libraries:
95329608
type: STRING
95339609
oshi:
95349610
- name: oshi
9535-
description: When the OSHI library is detected on the classpath, this instrumentation
9536-
will use the system class loader to load classes from the oshi-core jar that
9537-
are then used to generate system metrics.
9611+
display_name: OSHI
9612+
description: |
9613+
When the OSHI library is detected on the classpath, this instrumentation enables system metrics for memory, disk, and network operations.
9614+
semantic_conventions:
9615+
- SYSTEM_METRICS
95389616
library_link: https://github.com/oshi/oshi/
95399617
source_path: instrumentation/oshi
95409618
scope:
@@ -9546,7 +9624,8 @@ libraries:
95469624
- com.github.oshi:oshi-core:5.3.1
95479625
configurations:
95489626
- name: otel.instrumentation.oshi.experimental-metrics.enabled
9549-
description: Enable the OSHI process runtime metrics.
9627+
description: Enable the experimental `runtime.java.memory` and `runtime.java.cpu_time`
9628+
metrics.
95509629
type: boolean
95519630
default: false
95529631
telemetry:

instrumentation-docs/src/main/java/io/opentelemetry/instrumentation/docs/internal/SemanticConvention.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ public enum SemanticConvention {
2626
GRAPHQL_SERVER_SPANS,
2727
FAAS_SERVER_SPANS,
2828
GENAI_CLIENT_SPANS,
29-
GENAI_CLIENT_METRICS
29+
GENAI_CLIENT_METRICS,
30+
SYSTEM_METRICS
3031
}

instrumentation/okhttp/okhttp-2.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/okhttp/v2_2/OkHttp2Singletons.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ public final class OkHttp2Singletons {
2727
new TracingInterceptor(INSTRUMENTER, GlobalOpenTelemetry.get().getPropagators());
2828
}
2929

30-
public static Instrumenter<Request, Response> instrumenter() {
31-
return INSTRUMENTER;
32-
}
33-
3430
public static Interceptor tracingInterceptor() {
3531
return TRACING_INTERCEPTOR;
3632
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
description: This instrumentation enables HTTP client spans and HTTP client metrics for OkHttp.
2+
display_name: OkHttp
3+
semantic_conventions:
4+
- HTTP_CLIENT_SPANS
5+
- HTTP_CLIENT_METRICS
6+
configurations:
7+
- name: otel.instrumentation.http.known-methods
8+
description: >
9+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All
10+
other methods will be treated as `_OTHER`.
11+
type: list
12+
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
13+
- name: otel.instrumentation.http.client.capture-request-headers
14+
description: List of HTTP request headers to capture in HTTP client telemetry.
15+
type: list
16+
default: ""
17+
- name: otel.instrumentation.http.client.capture-response-headers
18+
description: List of HTTP response headers to capture in HTTP client telemetry.
19+
type: list
20+
default: ""
21+
- name: otel.instrumentation.common.peer-service-mapping
22+
description: Used to specify a mapping from host names or IP addresses to peer services.
23+
type: map
24+
default: ""
25+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
26+
description: >
27+
Enable the capture of experimental HTTP client telemetry. Adds the `http.request.body.size`
28+
and `http.response.body.size` attributes to spans, and records `http.client.request.size` and
29+
`http.client.response.size` metrics.
30+
type: boolean
31+
default: false
32+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
33+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
34+
type: boolean
35+
default: true
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
description: This instrumentation enables HTTP client spans and HTTP client metrics for OkHttp.
2+
display_name: OkHttp
3+
semantic_conventions:
4+
- HTTP_CLIENT_SPANS
5+
- HTTP_CLIENT_METRICS
6+
library_link: https://square.github.io/okhttp/
7+
configurations:
8+
- name: otel.instrumentation.http.known-methods
9+
description: >
10+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All
11+
other methods will be treated as `_OTHER`.
12+
type: list
13+
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
14+
- name: otel.instrumentation.http.client.capture-request-headers
15+
description: List of HTTP request headers to capture in HTTP client telemetry.
16+
type: list
17+
default: ""
18+
- name: otel.instrumentation.http.client.capture-response-headers
19+
description: List of HTTP response headers to capture in HTTP client telemetry.
20+
type: list
21+
default: ""
22+
- name: otel.instrumentation.common.peer-service-mapping
23+
description: Used to specify a mapping from host names or IP addresses to peer services.
24+
type: map
25+
default: ""
26+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
27+
description: >
28+
Enable the capture of experimental HTTP client telemetry. Adds the `http.request.body.size`
29+
and `http.response.body.size` attributes to spans, and records `http.client.request.size` and
30+
`http.client.response.size` metrics.
31+
type: boolean
32+
default: false
33+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
34+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
35+
type: boolean
36+
default: true

instrumentation/openai/openai-java-1.1/metadata.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
description: This instrumentation enables Gen AI client spans and metrics for OpenAI Java SDK 1.1+.
1+
description: This instrumentation enables Gen AI client spans and metrics for the OpenAI Java SDK.
2+
display_name: OpenAI Java SDK
3+
semantic_conventions:
4+
- GENAI_CLIENT_SPANS
5+
- GENAI_CLIENT_METRICS
26
library_link: https://github.com/openai/openai-java
37
configurations:
48
- name: otel.instrumentation.genai.capture-message-content
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
description: The Oracle Universal Connection Pool (UCP) instrumentation generates connection pool metrics.
1+
description: >
2+
The Oracle Universal Connection Pool (UCP) instrumentation enables database connection pool
3+
metrics for Oracle UCP data sources.
4+
display_name: Oracle UCP
5+
semantic_conventions:
6+
- DATABASE_POOL_METRICS
27
library_link: https://docs.oracle.com/database/121/JJUCP/

instrumentation/oshi/metadata.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
description: When the OSHI library is detected on the classpath, this instrumentation will use the system class loader to load classes from the oshi-core jar that are then used to generate system metrics.
1+
description: >
2+
When the OSHI library is detected on the classpath, this instrumentation enables system metrics
3+
for memory, disk, and network operations.
4+
display_name: OSHI
5+
semantic_conventions:
6+
- SYSTEM_METRICS
27
configurations:
38
- name: otel.instrumentation.oshi.experimental-metrics.enabled
4-
description: Enable the OSHI process runtime metrics.
9+
description: Enable the experimental `runtime.java.memory` and `runtime.java.cpu_time` metrics.
510
type: boolean
611
default: false
712
library_link: https://github.com/oshi/oshi/

0 commit comments

Comments
 (0)