Skip to content

Commit c1fa248

Browse files
committed
Another batch of metadata
1 parent 68fdead commit c1fa248

File tree

11 files changed

+310
-0
lines changed

11 files changed

+310
-0
lines changed

docs/instrumentation-list.yaml

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3541,6 +3541,8 @@ libraries:
35413541
- org.hibernate.reactive:hibernate-reactive-core:(,)
35423542
hikaricp:
35433543
- name: hikaricp-3.0
3544+
description: |
3545+
This instrumentation provides database CLIENT metrics for HikariCP 3.0+ connection pools. It reports metrics like connection timeouts, creation time, wait time, and usage time, along with connection pool stats such as active, idle, and pending connections.
35443546
source_path: instrumentation/hikaricp-3.0
35453547
scope:
35463548
name: io.opentelemetry.hikaricp-3.0
@@ -3679,12 +3681,42 @@ libraries:
36793681
type: STRING
36803682
http:
36813683
- name: http-url-connection
3684+
description: This instrumentation enables the generation of CLIENT spans for requests
3685+
made using `java.net.HttpURLConnection`.
36823686
source_path: instrumentation/http-url-connection
36833687
scope:
36843688
name: io.opentelemetry.http-url-connection
36853689
target_versions:
36863690
javaagent:
36873691
- Java 8+
3692+
configurations:
3693+
- name: otel.instrumentation.http.known-methods
3694+
description: |
3695+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
3696+
type: list
3697+
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
3698+
- name: otel.instrumentation.http.client.capture-request-headers
3699+
description: List of HTTP request headers to capture in HTTP client telemetry.
3700+
type: list
3701+
default: ''
3702+
- name: otel.instrumentation.http.client.capture-response-headers
3703+
description: List of HTTP response headers to capture in HTTP client telemetry.
3704+
type: list
3705+
default: ''
3706+
- name: otel.instrumentation.common.peer-service-mapping
3707+
description: Used to specify a mapping from host names or IP addresses to peer
3708+
services.
3709+
type: map
3710+
default: ''
3711+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
3712+
description: |
3713+
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.
3714+
type: boolean
3715+
default: false
3716+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
3717+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
3718+
type: boolean
3719+
default: true
36883720
telemetry:
36893721
- when: default
36903722
metrics:
@@ -3730,21 +3762,102 @@ libraries:
37303762
- com.netflix.hystrix:hystrix-core:[1.4.0,)
37313763
influxdb:
37323764
- name: influxdb-2.4
3765+
description: |
3766+
This instrumentation enables the generation of database CLIENT spans and metrics for operations executed using the InfluxDB Java client.
37333767
source_path: instrumentation/influxdb-2.4
37343768
scope:
37353769
name: io.opentelemetry.influxdb-2.4
37363770
target_versions:
37373771
javaagent:
37383772
- org.influxdb:influxdb-java:[2.4,)
3773+
telemetry:
3774+
- when: default
3775+
spans:
3776+
- span_kind: CLIENT
3777+
attributes:
3778+
- name: db.name
3779+
type: STRING
3780+
- name: db.operation
3781+
type: STRING
3782+
- name: db.statement
3783+
type: STRING
3784+
- name: db.system
3785+
type: STRING
3786+
- name: server.address
3787+
type: STRING
3788+
- name: server.port
3789+
type: LONG
3790+
- when: otel.semconv-stability.opt-in=database
3791+
metrics:
3792+
- name: db.client.operation.duration
3793+
description: Duration of database client operations.
3794+
type: HISTOGRAM
3795+
unit: s
3796+
attributes:
3797+
- name: db.namespace
3798+
type: STRING
3799+
- name: db.operation.name
3800+
type: STRING
3801+
- name: db.system.name
3802+
type: STRING
3803+
- name: server.address
3804+
type: STRING
3805+
- name: server.port
3806+
type: LONG
3807+
spans:
3808+
- span_kind: CLIENT
3809+
attributes:
3810+
- name: db.namespace
3811+
type: STRING
3812+
- name: db.operation.name
3813+
type: STRING
3814+
- name: db.query.text
3815+
type: STRING
3816+
- name: db.system.name
3817+
type: STRING
3818+
- name: server.address
3819+
type: STRING
3820+
- name: server.port
3821+
type: LONG
37393822
java:
37403823
- name: java-http-client
3824+
description: This instrumentation enables HTTP CLIENT spans and metrics for requests
3825+
made using the `java.net.http.HttpClient`.
37413826
source_path: instrumentation/java-http-client
37423827
minimum_java_version: 11
37433828
scope:
37443829
name: io.opentelemetry.java-http-client
37453830
target_versions:
37463831
javaagent:
37473832
- Java 11+
3833+
configurations:
3834+
- name: otel.instrumentation.http.known-methods
3835+
description: |
3836+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
3837+
type: list
3838+
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
3839+
- name: otel.instrumentation.http.client.capture-request-headers
3840+
description: List of HTTP request headers to capture in HTTP client telemetry.
3841+
type: list
3842+
default: ''
3843+
- name: otel.instrumentation.http.client.capture-response-headers
3844+
description: List of HTTP response headers to capture in HTTP client telemetry.
3845+
type: list
3846+
default: ''
3847+
- name: otel.instrumentation.common.peer-service-mapping
3848+
description: Used to specify a mapping from host names or IP addresses to peer
3849+
services.
3850+
type: map
3851+
default: ''
3852+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
3853+
description: |
3854+
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.
3855+
type: boolean
3856+
default: false
3857+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
3858+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
3859+
type: boolean
3860+
default: true
37483861
telemetry:
37493862
- when: default
37503863
metrics:
@@ -3783,14 +3896,91 @@ libraries:
37833896
- name: url.full
37843897
type: STRING
37853898
- name: java-http-server
3899+
description: This instrumentation enables HTTP SERVER spans and metrics for incoming
3900+
requests to servers that use or extend `com.sun.net.httpserver.HttpServer`.
37863901
source_path: instrumentation/java-http-server
37873902
scope:
37883903
name: io.opentelemetry.java-http-server
37893904
target_versions:
37903905
javaagent:
37913906
- Java 8+
3907+
configurations:
3908+
- name: otel.instrumentation.http.known-methods
3909+
description: |
3910+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All other methods will be treated as `_OTHER`.
3911+
type: list
3912+
default: CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE
3913+
- name: otel.instrumentation.http.server.capture-request-headers
3914+
description: List of HTTP request headers to capture in HTTP server telemetry.
3915+
type: list
3916+
default: ''
3917+
- name: otel.instrumentation.http.server.capture-response-headers
3918+
description: List of HTTP response headers to capture in HTTP server telemetry.
3919+
type: list
3920+
default: ''
3921+
- name: otel.instrumentation.common.peer-service-mapping
3922+
description: Used to specify a mapping from host names or IP addresses to peer
3923+
services.
3924+
type: map
3925+
default: ''
3926+
- name: otel.instrumentation.http.server.emit-experimental-telemetry
3927+
description: |
3928+
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.
3929+
type: boolean
3930+
default: false
3931+
telemetry:
3932+
- when: default
3933+
metrics:
3934+
- name: http.server.request.duration
3935+
description: Duration of HTTP server requests.
3936+
type: HISTOGRAM
3937+
unit: s
3938+
attributes:
3939+
- name: http.request.method
3940+
type: STRING
3941+
- name: http.response.status_code
3942+
type: LONG
3943+
- name: http.route
3944+
type: STRING
3945+
- name: network.protocol.version
3946+
type: STRING
3947+
- name: url.scheme
3948+
type: STRING
3949+
spans:
3950+
- span_kind: SERVER
3951+
attributes:
3952+
- name: client.address
3953+
type: STRING
3954+
- name: error.type
3955+
type: STRING
3956+
- name: http.request.method
3957+
type: STRING
3958+
- name: http.response.status_code
3959+
type: LONG
3960+
- name: http.route
3961+
type: STRING
3962+
- name: network.peer.address
3963+
type: STRING
3964+
- name: network.peer.port
3965+
type: LONG
3966+
- name: network.protocol.version
3967+
type: STRING
3968+
- name: server.address
3969+
type: STRING
3970+
- name: server.port
3971+
type: LONG
3972+
- name: url.path
3973+
type: STRING
3974+
- name: url.query
3975+
type: STRING
3976+
- name: url.scheme
3977+
type: STRING
3978+
- name: user_agent.original
3979+
type: STRING
37923980
javalin:
37933981
- name: javalin-5.0
3982+
description: This instrumentation enriches existing SERVER spans with route information,
3983+
it does not emit any telemetry on its own.
37943984
source_path: instrumentation/javalin-5.0
37953985
minimum_java_version: 11
37963986
scope:

instrumentation-docs/instrumentations.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ readonly INSTRUMENTATIONS=(
149149
"hibernate:hibernate-4.0:javaagent:testExperimental"
150150
"hibernate:hibernate-6.0:javaagent:test"
151151
"hibernate:hibernate-6.0:javaagent:testExperimental"
152+
"influxdb-2.4:javaagent:test"
153+
"influxdb-2.4:javaagent:testStableSemconv"
154+
"java-http-server:javaagent:test"
152155
)
153156

154157
# Some instrumentation test suites don't run ARM, so we use colima to run them in an x86_64
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
description: >
2+
This instrumentation provides database CLIENT metrics for HikariCP 3.0+ connection pools.
3+
It reports metrics like connection timeouts, creation time, wait time, and usage
4+
time, along with connection pool stats such as active, idle, and pending connections.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
description: This instrumentation enables the generation of CLIENT spans for requests
2+
made using `java.net.HttpURLConnection`.
3+
configurations:
4+
- name: otel.instrumentation.http.known-methods
5+
description: >
6+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All
7+
other methods will be treated as `_OTHER`.
8+
type: list
9+
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
10+
- name: otel.instrumentation.http.client.capture-request-headers
11+
description: List of HTTP request headers to capture in HTTP client telemetry.
12+
type: list
13+
default: ""
14+
- name: otel.instrumentation.http.client.capture-response-headers
15+
description: List of HTTP response headers to capture in HTTP client telemetry.
16+
type: list
17+
default: ""
18+
- name: otel.instrumentation.common.peer-service-mapping
19+
description: Used to specify a mapping from host names or IP addresses to peer services.
20+
type: map
21+
default: ""
22+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
23+
description: >
24+
Enable the capture of experimental HTTP client telemetry. Adds the `http.request.body.size`
25+
and `http.response.body.size` attributes to spans, and records `http.client.request.size` and
26+
`http.client.response.size` metrics.
27+
type: boolean
28+
default: false
29+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
30+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
31+
type: boolean
32+
default: true

instrumentation/influxdb-2.4/javaagent/build.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ tasks {
4141
// from the okhttp instrumentation we need OkHttp3IgnoredTypesConfigurer to fix context leaks
4242
jvmArgs("-Dotel.instrumentation.okhttp.enabled=false")
4343
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
44+
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
4445
}
4546

4647
if (!(findProperty("testLatestDeps") as Boolean)) {
@@ -53,6 +54,7 @@ tasks {
5354
testClassesDirs = sourceSets.test.get().output.classesDirs
5455
classpath = sourceSets.test.get().runtimeClasspath
5556

57+
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
5658
jvmArgs("-Dotel.semconv-stability.opt-in=database")
5759
}
5860

instrumentation/influxdb-2.4/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/influxdb/v2_4/InfluxDbClientTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,18 @@
55

66
package io.opentelemetry.javaagent.instrumentation.influxdb.v2_4;
77

8+
import static io.opentelemetry.instrumentation.testing.junit.db.DbClientMetricsTestUtil.assertDurationMetric;
89
import static io.opentelemetry.instrumentation.testing.junit.db.SemconvStabilityUtil.maybeStable;
910
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;
1011
import static io.opentelemetry.semconv.ServerAttributes.SERVER_ADDRESS;
1112
import static io.opentelemetry.semconv.ServerAttributes.SERVER_PORT;
1213
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_NAME;
14+
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_NAMESPACE;
1315
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_OPERATION;
16+
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_OPERATION_NAME;
1417
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_STATEMENT;
1518
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_SYSTEM;
19+
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_SYSTEM_NAME;
1620
import static java.util.Arrays.asList;
1721
import static org.assertj.core.api.Assertions.assertThat;
1822

@@ -150,6 +154,15 @@ void testQueryWithTwoArguments() {
150154
"SELECT * FROM cpu_load where test1 = ?",
151155
"SELECT",
152156
databaseName))));
157+
158+
assertDurationMetric(
159+
testing,
160+
"io.opentelemetry.influxdb-2.4",
161+
DB_SYSTEM_NAME,
162+
DB_NAMESPACE,
163+
DB_OPERATION_NAME,
164+
SERVER_ADDRESS,
165+
SERVER_PORT);
153166
}
154167

155168
@Test
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
description: >
2+
This instrumentation enables the generation of database CLIENT spans and metrics for operations
3+
executed using the InfluxDB Java client.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
description: This instrumentation enables HTTP CLIENT spans and metrics for requests made using the `java.net.http.HttpClient`.
2+
configurations:
3+
- name: otel.instrumentation.http.known-methods
4+
description: >
5+
Configures the instrumentation to recognize an alternative set of HTTP request methods. All
6+
other methods will be treated as `_OTHER`.
7+
type: list
8+
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
9+
- name: otel.instrumentation.http.client.capture-request-headers
10+
description: List of HTTP request headers to capture in HTTP client telemetry.
11+
type: list
12+
default: ""
13+
- name: otel.instrumentation.http.client.capture-response-headers
14+
description: List of HTTP response headers to capture in HTTP client telemetry.
15+
type: list
16+
default: ""
17+
- name: otel.instrumentation.common.peer-service-mapping
18+
description: Used to specify a mapping from host names or IP addresses to peer services.
19+
type: map
20+
default: ""
21+
- name: otel.instrumentation.http.client.emit-experimental-telemetry
22+
description: >
23+
Enable the capture of experimental HTTP client telemetry. Adds the `http.request.body.size`
24+
and `http.response.body.size` attributes to spans, and records `http.client.request.size` and
25+
`http.client.response.size` metrics.
26+
type: boolean
27+
default: false
28+
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
29+
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
30+
type: boolean
31+
default: true

instrumentation/java-http-server/javaagent/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,7 @@ dependencies {
1212
implementation(project(":instrumentation:java-http-server:library"))
1313
testImplementation(project(":instrumentation:java-http-server:testing"))
1414
}
15+
16+
tasks.test {
17+
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
18+
}

0 commit comments

Comments
 (0)