diff --git a/docs/instrumentation-list.yaml b/docs/instrumentation-list.yaml index f711f11a6f5a..dc7235c848b8 100644 --- a/docs/instrumentation-list.yaml +++ b/docs/instrumentation-list.yaml @@ -24,6 +24,39 @@ libraries: - com.typesafe.akka:akka-http_2.12:[10,) - com.typesafe.akka:akka-http_2.13:[10,) - com.typesafe.akka:akka-http_2.11:[10,) + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG + - name: http.server.request.duration + description: Duration of HTTP server requests. + type: HISTOGRAM + unit: s + attributes: + - name: http.request.method + type: STRING + - name: http.response.status_code + type: LONG + - name: http.route + type: STRING + - name: network.protocol.version + type: STRING + - name: url.scheme + type: STRING - name: akka-actor-fork-join-2.5 source_path: instrumentation/akka/akka-actor-fork-join-2.5 scope: @@ -163,6 +196,24 @@ libraries: target_versions: javaagent: - org.apache.httpcomponents:httpasyncclient:[4.1,) + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG - name: apache-httpclient-4.3 source_path: instrumentation/apache-httpclient/apache-httpclient-4.3 scope: @@ -404,6 +455,22 @@ libraries: description: Allows configuring headers to capture as span attributes. type: list default: '' + telemetry: + - when: otel.semconv-stability.opt-in=database + metrics: + - name: db.client.operation.duration + description: Duration of database client operations. + type: HISTOGRAM + unit: s + attributes: + - name: db.operation.name + type: STRING + - name: db.system.name + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG - name: aws-sdk-2.2 source_path: instrumentation/aws-sdk/aws-sdk-2.2 scope: @@ -450,6 +517,44 @@ libraries: should be recorded as events for the SDK span. type: boolean default: false + telemetry: + - when: default + metrics: + - name: gen_ai.client.operation.duration + description: GenAI operation duration. + type: HISTOGRAM + unit: s + attributes: + - name: gen_ai.operation.name + type: STRING + - name: gen_ai.request.model + type: STRING + - name: gen_ai.system + type: STRING + - name: gen_ai.client.token.usage + description: Measures number of input and output tokens used. + type: HISTOGRAM + unit: token + attributes: + - name: gen_ai.operation.name + type: STRING + - name: gen_ai.request.model + type: STRING + - name: gen_ai.system + type: STRING + - name: gen_ai.token.type + type: STRING + - when: otel.semconv-stability.opt-in=database + metrics: + - name: db.client.operation.duration + description: Duration of database client operations. + type: HISTOGRAM + unit: s + attributes: + - name: db.operation.name + type: STRING + - name: db.system.name + type: STRING azure: - name: azure-core-1.36 source_path: instrumentation/azure-core/azure-core-1.36 @@ -712,6 +817,12 @@ libraries: target_versions: javaagent: - org.elasticsearch.client:elasticsearch-rest-client:[6.4,7.0) + configurations: + - name: otel.instrumentation.elasticsearch.capture-search-query + description: | + Enable the capture of search query bodies. It is important to note that Elasticsearch queries may contain personal or sensitive information. + type: boolean + default: false - name: elasticsearch-api-client-7.16 source_path: instrumentation/elasticsearch/elasticsearch-api-client-7.16 scope: @@ -728,6 +839,13 @@ libraries: javaagent: - org.elasticsearch.client:rest:[5.0,6.4) - org.elasticsearch.client:elasticsearch-rest-client:[5.0,6.4) + configurations: + - name: otel.instrumentation.elasticsearch.capture-search-query + description: | + Enable the capture of search query bodies. It is important to note that Elasticsearch queries + may contain personal or sensitive information. + type: boolean + default: false - name: elasticsearch-rest-7.0 source_path: instrumentation/elasticsearch/elasticsearch-rest-7.0 scope: @@ -737,6 +855,12 @@ libraries: - org.elasticsearch.client:elasticsearch-rest-client:[7.0,) library: - org.elasticsearch.client:elasticsearch-rest-client:7.0.0 + configurations: + - name: otel.instrumentation.elasticsearch.capture-search-query + description: | + Enable the capture of search query bodies. It is important to note that Elasticsearch queries may contain personal or sensitive information. + type: boolean + default: false - name: elasticsearch-transport-6.0 source_path: instrumentation/elasticsearch/elasticsearch-transport-6.0 scope: @@ -814,6 +938,22 @@ libraries: target_versions: javaagent: - com.google.http-client:google-http-client:[1.19.0,) + 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 grails: - name: grails-3.0 source_path: instrumentation/grails-3.0 @@ -1062,6 +1202,24 @@ libraries: target_versions: javaagent: - Java 8+ + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG hystrix: - name: hystrix-1.4 source_path: instrumentation/hystrix-1.4 @@ -1094,6 +1252,24 @@ libraries: target_versions: javaagent: - Java 11+ + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG javalin: - name: javalin-5.0 source_path: instrumentation/javalin-5.0 @@ -1299,6 +1475,24 @@ libraries: - org.eclipse.jetty:jetty-client:[12,) library: - org.eclipse.jetty:jetty-client:12.0.0 + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG - name: jetty-12.0 source_path: instrumentation/jetty/jetty-12.0 minimum_java_version: 17 @@ -1323,6 +1517,24 @@ libraries: - org.eclipse.jetty:jetty-client:[9.2,10) library: - org.eclipse.jetty:jetty-client:[9.2.0.v20140526,9.+) + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG - name: jetty-11.0 source_path: instrumentation/jetty/jetty-11.0 minimum_java_version: 11 @@ -1357,6 +1569,24 @@ libraries: target_versions: javaagent: - org.jodd:jodd-http:[4.2.0,) + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG jsf: - name: jsf-myfaces-3.0 source_path: instrumentation/jsf/jsf-myfaces-3.0 @@ -1648,6 +1878,37 @@ libraries: target_versions: javaagent: - io.netty:netty:[3.8.0.Final,4) + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG + - name: http.server.request.duration + description: Duration of HTTP server requests. + type: HISTOGRAM + unit: s + attributes: + - name: http.request.method + type: STRING + - name: http.response.status_code + type: LONG + - name: network.protocol.version + type: STRING + - name: url.scheme + type: STRING - name: netty-4.0 source_path: instrumentation/netty/netty-4.0 scope: @@ -1656,33 +1917,149 @@ libraries: javaagent: - io.netty:netty-all:[4.0.0.Final,4.1.0.Final) - io.netty:netty-codec-http:[4.0.0.Final,4.1.0.Final) - - name: netty-4.1 - source_path: instrumentation/netty/netty-4.1 - scope: - name: io.opentelemetry.netty-4.1 - target_versions: - javaagent: - - io.netty:netty-codec-http:[4.1.0.Final,5.0.0) - - io.netty:netty-all:[4.1.0.Final,5.0.0) - library: - - io.netty:netty-codec-http:4.1.0.Final - okhttp: - - name: okhttp-3.0 - source_path: instrumentation/okhttp/okhttp-3.0 - scope: - name: io.opentelemetry.okhttp-3.0 - target_versions: - javaagent: - - com.squareup.okhttp3:okhttp:[3.0,) - library: - - com.squareup.okhttp3:okhttp:3.0.0 - - name: okhttp-2.2 + configurations: + - name: otel.instrumentation.netty.connection-telemetry.enabled + description: Enable the creation of Connect and DNS spans + type: boolean + default: false + - name: otel.instrumentation.netty.ssl-telemetry.enabled + description: Enable SSL telemetry + type: boolean + default: false + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG + - name: http.server.request.duration + description: Duration of HTTP server requests. + type: HISTOGRAM + unit: s + attributes: + - name: http.request.method + type: STRING + - name: http.response.status_code + type: LONG + - name: network.protocol.version + type: STRING + - name: url.scheme + type: STRING + - name: netty-4.1 + source_path: instrumentation/netty/netty-4.1 + scope: + name: io.opentelemetry.netty-4.1 + target_versions: + javaagent: + - io.netty:netty-codec-http:[4.1.0.Final,5.0.0) + - io.netty:netty-all:[4.1.0.Final,5.0.0) + library: + - io.netty:netty-codec-http:4.1.0.Final + configurations: + - name: otel.instrumentation.netty.connection-telemetry.enabled + description: Enable the creation of Connect and DNS spans + type: boolean + default: false + - name: otel.instrumentation.netty.ssl-telemetry.enabled + description: Enable SSL telemetry + type: boolean + default: false + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG + - name: http.server.request.duration + description: Duration of HTTP server requests. + type: HISTOGRAM + unit: s + attributes: + - name: http.request.method + type: STRING + - name: http.response.status_code + type: LONG + - name: network.protocol.version + type: STRING + - name: url.scheme + type: STRING + okhttp: + - name: okhttp-3.0 + source_path: instrumentation/okhttp/okhttp-3.0 + scope: + name: io.opentelemetry.okhttp-3.0 + target_versions: + javaagent: + - com.squareup.okhttp3:okhttp:[3.0,) + library: + - com.squareup.okhttp3:okhttp:3.0.0 + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG + - name: okhttp-2.2 source_path: instrumentation/okhttp/okhttp-2.2 scope: name: io.opentelemetry.okhttp-2.2 target_versions: javaagent: - com.squareup.okhttp:okhttp:[2.2,3) + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG opensearch: - name: opensearch-rest-3.0 source_path: instrumentation/opensearch/opensearch-rest-3.0 @@ -1949,6 +2326,39 @@ libraries: - org.apache.pekko:pekko-http_3:[1.0,) - com.softwaremill.sttp.tapir:tapir-pekko-http-server_2.13:[1.7,) - org.apache.pekko:pekko-http_2.13:[1.0,) + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG + - name: http.server.request.duration + description: Duration of HTTP server requests. + type: HISTOGRAM + unit: s + attributes: + - name: http.request.method + type: STRING + - name: http.response.status_code + type: LONG + - name: http.route + type: STRING + - name: network.protocol.version + type: STRING + - name: url.scheme + type: STRING play: - name: play-ws-1.0 source_path: instrumentation/play/play-ws/play-ws-1.0 @@ -1958,6 +2368,22 @@ libraries: javaagent: - com.typesafe.play:play-ahc-ws-standalone_2.12:[1.0.0,2.0.0) - com.typesafe.play:play-ahc-ws-standalone_2.11:[1.0.0,2.0.0) + 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 - name: play-mvc-2.6 source_path: instrumentation/play/play-mvc/play-mvc-2.6 scope: @@ -1983,6 +2409,22 @@ libraries: - com.typesafe.play:play-ahc-ws-standalone_2.12:[2.0.0,2.1.0) - com.typesafe.play:play-ahc-ws-standalone_2.13:[2.0.6,2.1.0) - com.typesafe.play:play-ahc-ws-standalone_2.11:[2.0.0,] + 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 - name: play-ws-2.1 source_path: instrumentation/play/play-ws/play-ws-2.1 scope: @@ -1991,6 +2433,22 @@ libraries: javaagent: - com.typesafe.play:play-ahc-ws-standalone_2.13:[2.1.0,] - com.typesafe.play:play-ahc-ws-standalone_2.12:[2.1.0,] + 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 powerjob: - name: powerjob-4.0 source_path: instrumentation/powerjob-4.0 @@ -2089,6 +2547,24 @@ libraries: target_versions: javaagent: - io.projectreactor.netty:reactor-netty:[0.8.2.RELEASE,1.0.0) + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG - name: reactor-netty-1.0 source_path: instrumentation/reactor/reactor-netty/reactor-netty-1.0 scope: @@ -2097,6 +2573,29 @@ libraries: javaagent: - io.projectreactor.netty:reactor-netty-http:[1.0.0,) - io.projectreactor.netty:reactor-netty:[1.0.0,) + configurations: + - name: otel.instrumentation.reactor-netty.connection-telemetry.enabled + description: Enable the creation of Connect and DNS spans. + type: boolean + default: false + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG rediscala: - name: rediscala-1.8 source_path: instrumentation/rediscala-1.8 @@ -2303,6 +2802,37 @@ libraries: - io.projectreactor.ipc:reactor-netty:[0.7.0.RELEASE,) - org.springframework:spring-webflux:[5.0.0.RELEASE,) - io.projectreactor.netty:reactor-netty:[0.8.0.RELEASE,) + 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 + - name: http.server.request.duration + description: Duration of HTTP server requests. + type: HISTOGRAM + unit: s + attributes: + - name: http.request.method + type: STRING + - name: http.response.status_code + type: LONG + - name: http.route + type: STRING + - name: network.protocol.version + type: STRING + - name: url.scheme + type: STRING - name: spring-webflux-5.3 source_path: instrumentation/spring/spring-webflux/spring-webflux-5.3 scope: @@ -2619,6 +3149,28 @@ libraries: target_versions: javaagent: - io.vertx:vertx-redis-client:[4.0.0,) + telemetry: + - when: otel.semconv-stability.opt-in=database + metrics: + - name: db.client.operation.duration + description: Duration of database client operations. + type: HISTOGRAM + unit: s + attributes: + - name: db.namespace + type: STRING + - name: db.operation.name + type: STRING + - name: db.system.name + type: STRING + - name: network.peer.address + type: STRING + - name: network.peer.port + type: LONG + - name: server.address + type: STRING + - name: server.port + type: LONG - name: vertx-sql-client-5.0 source_path: instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0 minimum_java_version: 11 @@ -2627,6 +3179,24 @@ libraries: target_versions: javaagent: - io.vertx:vertx-sql-client:[5.0.0,) + telemetry: + - when: otel.semconv-stability.opt-in=database + metrics: + - name: db.client.operation.duration + description: Duration of database client operations. + type: HISTOGRAM + unit: s + attributes: + - name: db.collection.name + type: STRING + - name: db.namespace + type: STRING + - name: db.operation.name + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG - name: vertx-http-client-5.0 source_path: instrumentation/vertx/vertx-http-client/vertx-http-client-5.0 minimum_java_version: 11 @@ -2635,6 +3205,24 @@ libraries: target_versions: javaagent: - io.vertx:vertx-core:[5.0.0,) + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG - name: vertx-web-3.0 source_path: instrumentation/vertx/vertx-web-3.0 scope: @@ -2649,6 +3237,24 @@ libraries: target_versions: javaagent: - io.vertx:vertx-sql-client:[4.0.0,5) + telemetry: + - when: otel.semconv-stability.opt-in=database + metrics: + - name: db.client.operation.duration + description: Duration of database client operations. + type: HISTOGRAM + unit: s + attributes: + - name: db.collection.name + type: STRING + - name: db.namespace + type: STRING + - name: db.operation.name + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG - name: vertx-http-client-4.0 source_path: instrumentation/vertx/vertx-http-client/vertx-http-client-4.0 scope: @@ -2656,6 +3262,24 @@ libraries: target_versions: javaagent: - io.vertx:vertx-core:[4.0.0,5) + 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: network.protocol.version + type: STRING + - name: server.address + type: STRING + - name: server.port + type: LONG - name: vertx-rx-java-3.5 source_path: instrumentation/vertx/vertx-rx-java-3.5 scope: @@ -2670,6 +3294,22 @@ libraries: target_versions: javaagent: - io.vertx:vertx-core:[3.0.0,4.0.0) + 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 vibur: - name: vibur-dbcp-11.0 description: Instrumentation for the vibur-dbcp library, which provides connection diff --git a/instrumentation-docs/collect.sh b/instrumentation-docs/collect.sh index c967c09636dc..df8bf9e0d47d 100755 --- a/instrumentation-docs/collect.sh +++ b/instrumentation-docs/collect.sh @@ -14,6 +14,8 @@ fi readonly INSTRUMENTATIONS=( # : : [ gradle-task-suffix ] + "akka:akka-http-10.0:javaagent:test" + "apache-httpasyncclient-4.1:javaagent:test" "alibaba-druid-1.0:javaagent:test" "alibaba-druid-1.0:javaagent:testStableSemconv" "apache-dbcp-2.0:javaagent:test" @@ -23,6 +25,38 @@ readonly INSTRUMENTATIONS=( "c3p0-0.9:javaagent:testStableSemconv" "clickhouse-client-0.5:javaagent:test" "clickhouse-client-0.5:javaagent:testStableSemconv" + "aws-sdk:aws-sdk-1.11:javaagent:test" + "google-http-client-1.19:javaagent:test" + "http-url-connection:javaagent:test" + "java-http-client:javaagent:test" + "jetty-httpclient:jetty-httpclient-9.2:javaagent:test" + "jetty-httpclient:jetty-httpclient-12.0:javaagent:test" + "jodd-http-4.2:javaagent:test" + "netty:netty-3.8:javaagent:test" + "netty:netty-4.0:javaagent:test" + "netty:netty-4.1:javaagent:test" + "okhttp:okhttp-2.2:javaagent:test" + "okhttp:okhttp-3.0:javaagent:test" + "pekko:pekko-http-1.0:javaagent:test" + "play:play-ws:play-ws-1.0:javaagent:test" + "play:play-ws:play-ws-2.0:javaagent:test" + "play:play-ws:play-ws-2.1:javaagent:test" + "reactor:reactor-netty:reactor-netty-0.9:javaagent:test" + "reactor:reactor-netty:reactor-netty-1.0:javaagent:test" + "spring:spring-webflux:spring-webflux-5.0:javaagent:test" + "vertx:vertx-http-client:vertx-http-client-3.0:javaagent:test" + "vertx:vertx-http-client:vertx-http-client-4.0:javaagent:test" + "vertx:vertx-http-client:vertx-http-client-5.0:javaagent:test" + "vertx:vertx-redis-client-4.0:javaagent:test" + "vertx:vertx-redis-client-4.0:javaagent:testStableSemconv" + "vertx:vertx-sql-client:vertx-sql-client-4.0:javaagent:test" + "vertx:vertx-sql-client:vertx-sql-client-4.0:javaagent:testStableSemconv" + "vertx:vertx-sql-client:vertx-sql-client-5.0:javaagent:test" + "vertx:vertx-sql-client:vertx-sql-client-5.0:javaagent:testStableSemconv" + "aws-sdk:aws-sdk-1.11:javaagent:testStableSemconv" + "aws-sdk:aws-sdk-2.2:javaagent:test" + "aws-sdk:aws-sdk-2.2:javaagent:testStableSemconv" + "aws-sdk:aws-sdk-2.2:javaagent:testBedrockRuntime" "hikaricp-3.0:javaagent:test" "hikaricp-3.0:javaagent:testStableSemconv" "tomcat:tomcat-jdbc:javaagent:test" diff --git a/instrumentation/akka/akka-http-10.0/javaagent/build.gradle.kts b/instrumentation/akka/akka-http-10.0/javaagent/build.gradle.kts index a9eaa673e156..b29d53d34cd7 100644 --- a/instrumentation/akka/akka-http-10.0/javaagent/build.gradle.kts +++ b/instrumentation/akka/akka-http-10.0/javaagent/build.gradle.kts @@ -65,6 +65,7 @@ tasks { jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean) + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") } check { diff --git a/instrumentation/apache-httpasyncclient-4.1/javaagent/build.gradle.kts b/instrumentation/apache-httpasyncclient-4.1/javaagent/build.gradle.kts index 9f4aefdd36e6..dfecfc737f31 100644 --- a/instrumentation/apache-httpasyncclient-4.1/javaagent/build.gradle.kts +++ b/instrumentation/apache-httpasyncclient-4.1/javaagent/build.gradle.kts @@ -16,3 +16,9 @@ muzzle { dependencies { library("org.apache.httpcomponents:httpasyncclient:4.1") } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/build.gradle.kts b/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/build.gradle.kts index cdd8ecfe2ae4..48def6f44070 100644 --- a/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/build.gradle.kts +++ b/instrumentation/aws-sdk/aws-sdk-1.11/javaagent/build.gradle.kts @@ -130,6 +130,8 @@ testing { } } +val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false" + tasks { if (!(findProperty("testLatestDeps") as Boolean)) { check { @@ -143,6 +145,9 @@ tasks { val testStableSemconv by registering(Test::class) { jvmArgs("-Dotel.semconv-stability.opt-in=database") + + systemProperty("collectMetadata", collectMetadata) + systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database") } check { @@ -151,6 +156,7 @@ tasks { test { usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) + systemProperty("collectMetadata", collectMetadata) } withType().configureEach { diff --git a/instrumentation/aws-sdk/aws-sdk-2.2/javaagent/build.gradle.kts b/instrumentation/aws-sdk/aws-sdk-2.2/javaagent/build.gradle.kts index 676b88988d9b..af5442da74fb 100644 --- a/instrumentation/aws-sdk/aws-sdk-2.2/javaagent/build.gradle.kts +++ b/instrumentation/aws-sdk/aws-sdk-2.2/javaagent/build.gradle.kts @@ -128,6 +128,7 @@ dependencies { } val latestDepTest = findProperty("testLatestDeps") as Boolean +val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false" testing { suites { @@ -161,6 +162,7 @@ testing { testTask.configure { // TODO run tests both with and without genai message capture systemProperty("otel.instrumentation.genai.capture-message-content", "true") + systemProperty("collectMetadata", collectMetadata) } } } @@ -189,6 +191,7 @@ tasks { excludeTestsMatching("Aws2SqsSuppressReceiveSpansTest") } systemProperty("otel.instrumentation.messaging.experimental.receive-telemetry.enabled", "true") + systemProperty("collectMetadata", collectMetadata) } check { @@ -202,6 +205,7 @@ tasks { systemProperty("otel.instrumentation.aws-sdk.experimental-span-attributes", "true") systemProperty("otel.instrumentation.aws-sdk.experimental-record-individual-http-error", "true") systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean) + systemProperty("collectMetadata", collectMetadata) } withType().configureEach { @@ -216,6 +220,8 @@ tasks { } systemProperty("otel.instrumentation.messaging.experimental.receive-telemetry.enabled", "true") jvmArgs("-Dotel.semconv-stability.opt-in=database") + + systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database") } check { diff --git a/instrumentation/elasticsearch/elasticsearch-rest-5.0/metadata.yaml b/instrumentation/elasticsearch/elasticsearch-rest-5.0/metadata.yaml new file mode 100644 index 000000000000..65e65ca8b63b --- /dev/null +++ b/instrumentation/elasticsearch/elasticsearch-rest-5.0/metadata.yaml @@ -0,0 +1,7 @@ +configurations: + - name: otel.instrumentation.elasticsearch.capture-search-query + description: | + Enable the capture of search query bodies. It is important to note that Elasticsearch queries + may contain personal or sensitive information. + type: boolean + default: false diff --git a/instrumentation/elasticsearch/elasticsearch-rest-6.4/metadata.yaml b/instrumentation/elasticsearch/elasticsearch-rest-6.4/metadata.yaml new file mode 100644 index 000000000000..3d330ea5908f --- /dev/null +++ b/instrumentation/elasticsearch/elasticsearch-rest-6.4/metadata.yaml @@ -0,0 +1,7 @@ +configurations: + - name: otel.instrumentation.elasticsearch.capture-search-query + description: > + Enable the capture of search query bodies. It is important to note that Elasticsearch queries + may contain personal or sensitive information. + type: boolean + default: false diff --git a/instrumentation/elasticsearch/elasticsearch-rest-7.0/metadata.yaml b/instrumentation/elasticsearch/elasticsearch-rest-7.0/metadata.yaml new file mode 100644 index 000000000000..3d330ea5908f --- /dev/null +++ b/instrumentation/elasticsearch/elasticsearch-rest-7.0/metadata.yaml @@ -0,0 +1,7 @@ +configurations: + - name: otel.instrumentation.elasticsearch.capture-search-query + description: > + Enable the capture of search query bodies. It is important to note that Elasticsearch queries + may contain personal or sensitive information. + type: boolean + default: false diff --git a/instrumentation/elasticsearch/elasticsearch-rest-common-5.0/library/src/main/java/io/opentelemetry/instrumentation/elasticsearch/rest/common/v5_0/internal/ElasticsearchRestInstrumenterFactory.java b/instrumentation/elasticsearch/elasticsearch-rest-common-5.0/library/src/main/java/io/opentelemetry/instrumentation/elasticsearch/rest/common/v5_0/internal/ElasticsearchRestInstrumenterFactory.java index 91f5da92454a..c6e0e0f9ae79 100644 --- a/instrumentation/elasticsearch/elasticsearch-rest-common-5.0/library/src/main/java/io/opentelemetry/instrumentation/elasticsearch/rest/common/v5_0/internal/ElasticsearchRestInstrumenterFactory.java +++ b/instrumentation/elasticsearch/elasticsearch-rest-common-5.0/library/src/main/java/io/opentelemetry/instrumentation/elasticsearch/rest/common/v5_0/internal/ElasticsearchRestInstrumenterFactory.java @@ -37,7 +37,7 @@ public static Instrumenter create( boolean captureSearchQuery) { ElasticsearchDbAttributesGetter dbClientAttributesGetter = new ElasticsearchDbAttributesGetter(captureSearchQuery); - ElasticsearchClientAttributeExtractor esClientAtrributesExtractor = + ElasticsearchClientAttributeExtractor esClientAttributesExtractor = new ElasticsearchClientAttributeExtractor(knownMethods); SpanNameExtractor spanNameExtractor = spanNameExtractorTransformer.apply( @@ -46,7 +46,7 @@ public static Instrumenter create( return Instrumenter.builder( openTelemetry, instrumentationName, spanNameExtractor) .addAttributesExtractor(DbClientAttributesExtractor.create(dbClientAttributesGetter)) - .addAttributesExtractor(esClientAtrributesExtractor) + .addAttributesExtractor(esClientAttributesExtractor) .addAttributesExtractors(attributesExtractors) .addOperationMetrics(DbClientMetrics.get()) .buildInstrumenter(SpanKindExtractor.alwaysClient()); diff --git a/instrumentation/google-http-client-1.19/javaagent/build.gradle.kts b/instrumentation/google-http-client-1.19/javaagent/build.gradle.kts index a94531eff5c0..8b0524963219 100644 --- a/instrumentation/google-http-client-1.19/javaagent/build.gradle.kts +++ b/instrumentation/google-http-client-1.19/javaagent/build.gradle.kts @@ -15,3 +15,9 @@ muzzle { dependencies { library("com.google.http-client:google-http-client:1.19.0") } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/http-url-connection/javaagent/build.gradle.kts b/instrumentation/http-url-connection/javaagent/build.gradle.kts index e3b48373e176..e3ca61be8268 100644 --- a/instrumentation/http-url-connection/javaagent/build.gradle.kts +++ b/instrumentation/http-url-connection/javaagent/build.gradle.kts @@ -7,3 +7,9 @@ muzzle { coreJdk() } } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/java-http-client/javaagent/build.gradle.kts b/instrumentation/java-http-client/javaagent/build.gradle.kts index 3aa5a8dd49ad..ebefd6564f8b 100644 --- a/instrumentation/java-http-client/javaagent/build.gradle.kts +++ b/instrumentation/java-http-client/javaagent/build.gradle.kts @@ -16,3 +16,9 @@ dependencies { implementation(project(":instrumentation:java-http-client:library")) testImplementation(project(":instrumentation:java-http-client:testing")) } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/jetty-httpclient/jetty-httpclient-12.0/javaagent/build.gradle.kts b/instrumentation/jetty-httpclient/jetty-httpclient-12.0/javaagent/build.gradle.kts index ae4b56855e0c..ed81324aca33 100644 --- a/instrumentation/jetty-httpclient/jetty-httpclient-12.0/javaagent/build.gradle.kts +++ b/instrumentation/jetty-httpclient/jetty-httpclient-12.0/javaagent/build.gradle.kts @@ -23,3 +23,9 @@ dependencies { testImplementation(project(":instrumentation:jetty-httpclient:jetty-httpclient-12.0:testing")) } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/jetty-httpclient/jetty-httpclient-9.2/javaagent/build.gradle.kts b/instrumentation/jetty-httpclient/jetty-httpclient-9.2/javaagent/build.gradle.kts index 71d9062f5375..a6d3a17b19bf 100644 --- a/instrumentation/jetty-httpclient/jetty-httpclient-9.2/javaagent/build.gradle.kts +++ b/instrumentation/jetty-httpclient/jetty-httpclient-9.2/javaagent/build.gradle.kts @@ -24,3 +24,9 @@ dependencies { latestDepTestLibrary("org.eclipse.jetty:jetty-client:9.+") // documented limitation } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/jodd-http-4.2/javaagent/build.gradle.kts b/instrumentation/jodd-http-4.2/javaagent/build.gradle.kts index dfb5e0287dcc..c28fe3ec2e91 100644 --- a/instrumentation/jodd-http-4.2/javaagent/build.gradle.kts +++ b/instrumentation/jodd-http-4.2/javaagent/build.gradle.kts @@ -17,3 +17,9 @@ dependencies { testImplementation(project(":instrumentation:jodd-http-4.2:javaagent")) testImplementation(project(":instrumentation-api-incubator")) } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/netty/netty-3.8/javaagent/build.gradle.kts b/instrumentation/netty/netty-3.8/javaagent/build.gradle.kts index c04a51c62b75..1d23aca529e8 100644 --- a/instrumentation/netty/netty-3.8/javaagent/build.gradle.kts +++ b/instrumentation/netty/netty-3.8/javaagent/build.gradle.kts @@ -50,3 +50,9 @@ if (!(findProperty("testLatestDeps") as Boolean)) { } } } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/netty/netty-4.0/javaagent/build.gradle.kts b/instrumentation/netty/netty-4.0/javaagent/build.gradle.kts index 33826ed86342..ac89ed679b18 100644 --- a/instrumentation/netty/netty-4.0/javaagent/build.gradle.kts +++ b/instrumentation/netty/netty-4.0/javaagent/build.gradle.kts @@ -48,6 +48,8 @@ tasks { } test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + filter { excludeTestsMatching("Netty40ConnectionSpanTest") excludeTestsMatching("Netty40ClientSslTest") diff --git a/instrumentation/netty/netty-4.0/metadata.yaml b/instrumentation/netty/netty-4.0/metadata.yaml new file mode 100644 index 000000000000..9afb14a1a3ea --- /dev/null +++ b/instrumentation/netty/netty-4.0/metadata.yaml @@ -0,0 +1,9 @@ +configurations: + - name: otel.instrumentation.netty.connection-telemetry.enabled + description: Enable the creation of Connect and DNS spans + default: false + type: boolean + - name: otel.instrumentation.netty.ssl-telemetry.enabled + description: Enable SSL telemetry + default: false + type: boolean diff --git a/instrumentation/netty/netty-4.1/javaagent/build.gradle.kts b/instrumentation/netty/netty-4.1/javaagent/build.gradle.kts index f43ed52d7922..048d21736923 100644 --- a/instrumentation/netty/netty-4.1/javaagent/build.gradle.kts +++ b/instrumentation/netty/netty-4.1/javaagent/build.gradle.kts @@ -56,6 +56,7 @@ tasks { test { systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean) + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") filter { excludeTestsMatching("Netty41ConnectionSpanTest") diff --git a/instrumentation/netty/netty-4.1/metadata.yaml b/instrumentation/netty/netty-4.1/metadata.yaml new file mode 100644 index 000000000000..9afb14a1a3ea --- /dev/null +++ b/instrumentation/netty/netty-4.1/metadata.yaml @@ -0,0 +1,9 @@ +configurations: + - name: otel.instrumentation.netty.connection-telemetry.enabled + description: Enable the creation of Connect and DNS spans + default: false + type: boolean + - name: otel.instrumentation.netty.ssl-telemetry.enabled + description: Enable SSL telemetry + default: false + type: boolean diff --git a/instrumentation/okhttp/okhttp-2.2/javaagent/build.gradle.kts b/instrumentation/okhttp/okhttp-2.2/javaagent/build.gradle.kts index 14ead8cf3a40..4e092cbe8233 100644 --- a/instrumentation/okhttp/okhttp-2.2/javaagent/build.gradle.kts +++ b/instrumentation/okhttp/okhttp-2.2/javaagent/build.gradle.kts @@ -22,3 +22,9 @@ dependencies { latestDepTestLibrary("com.squareup.okhttp:okhttp:2.+") // see okhttp-3.0 module } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/okhttp/okhttp-3.0/javaagent/build.gradle.kts b/instrumentation/okhttp/okhttp-3.0/javaagent/build.gradle.kts index b6e2affb53c1..68ca211cf3a5 100644 --- a/instrumentation/okhttp/okhttp-3.0/javaagent/build.gradle.kts +++ b/instrumentation/okhttp/okhttp-3.0/javaagent/build.gradle.kts @@ -43,4 +43,8 @@ tasks { check { dependsOn(testing.suites) } + + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } } diff --git a/instrumentation/pekko/pekko-http-1.0/javaagent/build.gradle.kts b/instrumentation/pekko/pekko-http-1.0/javaagent/build.gradle.kts index 96b3276d2da9..0daa9e64d8bf 100644 --- a/instrumentation/pekko/pekko-http-1.0/javaagent/build.gradle.kts +++ b/instrumentation/pekko/pekko-http-1.0/javaagent/build.gradle.kts @@ -92,6 +92,7 @@ tasks { jvmArgs("-XX:+IgnoreUnrecognizedVMOptions") systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean) + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") } check { diff --git a/instrumentation/play/play-ws/play-ws-1.0/javaagent/build.gradle.kts b/instrumentation/play/play-ws/play-ws-1.0/javaagent/build.gradle.kts index d43ca9dd5e28..e55989c935ba 100644 --- a/instrumentation/play/play-ws/play-ws-1.0/javaagent/build.gradle.kts +++ b/instrumentation/play/play-ws/play-ws-1.0/javaagent/build.gradle.kts @@ -39,3 +39,9 @@ dependencies { latestDepTestLibrary("com.typesafe.play:play-ahc-ws-standalone_$scalaVersion:1.+") // see play-ws-2.0 module } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/play/play-ws/play-ws-2.0/javaagent/build.gradle.kts b/instrumentation/play/play-ws/play-ws-2.0/javaagent/build.gradle.kts index b1330c2b710b..6fe7a94b9a65 100644 --- a/instrumentation/play/play-ws/play-ws-2.0/javaagent/build.gradle.kts +++ b/instrumentation/play/play-ws/play-ws-2.0/javaagent/build.gradle.kts @@ -45,3 +45,9 @@ dependencies { latestDepTestLibrary("com.typesafe.play:play-ahc-ws-standalone_$scalaVersion:2.0.+") // see play-ws-2.1 module } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/play/play-ws/play-ws-2.1/javaagent/build.gradle.kts b/instrumentation/play/play-ws/play-ws-2.1/javaagent/build.gradle.kts index 5f22b80408c0..18963782b51b 100644 --- a/instrumentation/play/play-ws/play-ws-2.1/javaagent/build.gradle.kts +++ b/instrumentation/play/play-ws/play-ws-2.1/javaagent/build.gradle.kts @@ -67,6 +67,10 @@ tasks { enabled = testLatestDeps } + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } + check { dependsOn(testing.suites) } diff --git a/instrumentation/play/play-ws/play-ws-common/javaagent/build.gradle.kts b/instrumentation/play/play-ws/play-ws-common/javaagent/build.gradle.kts index 59358d739880..1e65dd27f238 100644 --- a/instrumentation/play/play-ws/play-ws-common/javaagent/build.gradle.kts +++ b/instrumentation/play/play-ws/play-ws-common/javaagent/build.gradle.kts @@ -7,3 +7,9 @@ val scalaVersion = "2.12" dependencies { compileOnly("com.typesafe.play:play-ahc-ws-standalone_$scalaVersion:1.0.2") } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/reactor/reactor-netty/reactor-netty-0.9/javaagent/build.gradle.kts b/instrumentation/reactor/reactor-netty/reactor-netty-0.9/javaagent/build.gradle.kts index 13d925e5b9d8..a5d9f62bc544 100644 --- a/instrumentation/reactor/reactor-netty/reactor-netty-0.9/javaagent/build.gradle.kts +++ b/instrumentation/reactor/reactor-netty/reactor-netty-0.9/javaagent/build.gradle.kts @@ -42,6 +42,8 @@ tasks { } test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + filter { excludeTestsMatching("ReactorNettyConnectionSpanTest") } diff --git a/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/build.gradle.kts b/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/build.gradle.kts index 592d790aa22d..c54a3abed42e 100644 --- a/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/build.gradle.kts +++ b/instrumentation/reactor/reactor-netty/reactor-netty-1.0/javaagent/build.gradle.kts @@ -56,6 +56,8 @@ tasks { } test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + filter { excludeTestsMatching("ReactorNettyConnectionSpanTest") excludeTestsMatching("ReactorNettyClientSslTest") diff --git a/instrumentation/reactor/reactor-netty/reactor-netty-1.0/metadata.yaml b/instrumentation/reactor/reactor-netty/reactor-netty-1.0/metadata.yaml new file mode 100644 index 000000000000..f3677440ceaa --- /dev/null +++ b/instrumentation/reactor/reactor-netty/reactor-netty-1.0/metadata.yaml @@ -0,0 +1,5 @@ +configurations: + - name: otel.instrumentation.reactor-netty.connection-telemetry.enabled + description: Enable the creation of Connect and DNS spans. + type: boolean + default: false diff --git a/instrumentation/spring/spring-webflux/spring-webflux-5.0/javaagent/build.gradle.kts b/instrumentation/spring/spring-webflux/spring-webflux-5.0/javaagent/build.gradle.kts index fbb1b5dfcc6f..5c72229ca019 100644 --- a/instrumentation/spring/spring-webflux/spring-webflux-5.0/javaagent/build.gradle.kts +++ b/instrumentation/spring/spring-webflux/spring-webflux-5.0/javaagent/build.gradle.kts @@ -70,6 +70,7 @@ tasks.withType().configureEach { jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true") systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean) + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") } val latestDepTest = findProperty("testLatestDeps") as Boolean diff --git a/instrumentation/vertx/vertx-http-client/vertx-http-client-3.0/javaagent/build.gradle.kts b/instrumentation/vertx/vertx-http-client/vertx-http-client-3.0/javaagent/build.gradle.kts index ea99b7ca9e28..23f9a21b6d7b 100644 --- a/instrumentation/vertx/vertx-http-client/vertx-http-client-3.0/javaagent/build.gradle.kts +++ b/instrumentation/vertx/vertx-http-client/vertx-http-client-3.0/javaagent/build.gradle.kts @@ -37,5 +37,6 @@ dependencies { tasks { withType().configureEach { systemProperty("testLatestDeps", findProperty("testLatestDeps") as Boolean) + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") } } diff --git a/instrumentation/vertx/vertx-http-client/vertx-http-client-4.0/javaagent/build.gradle.kts b/instrumentation/vertx/vertx-http-client/vertx-http-client-4.0/javaagent/build.gradle.kts index 8ba053117f7c..2bde4fc6c0e3 100644 --- a/instrumentation/vertx/vertx-http-client/vertx-http-client-4.0/javaagent/build.gradle.kts +++ b/instrumentation/vertx/vertx-http-client/vertx-http-client-4.0/javaagent/build.gradle.kts @@ -24,3 +24,9 @@ dependencies { latestDepTestLibrary("io.vertx:vertx-core:4.+") // see vertx-http-client-5.0 module latestDepTestLibrary("io.vertx:vertx-codegen:4.+") // see vertx-http-client-5.0 module } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/vertx/vertx-http-client/vertx-http-client-5.0/javaagent/build.gradle.kts b/instrumentation/vertx/vertx-http-client/vertx-http-client-5.0/javaagent/build.gradle.kts index a36013f357f2..b6ea812b3b97 100644 --- a/instrumentation/vertx/vertx-http-client/vertx-http-client-5.0/javaagent/build.gradle.kts +++ b/instrumentation/vertx/vertx-http-client/vertx-http-client-5.0/javaagent/build.gradle.kts @@ -26,3 +26,9 @@ dependencies { testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent")) testInstrumentation(project(":instrumentation:vertx:vertx-http-client:vertx-http-client-4.0:javaagent")) } + +tasks { + test { + systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false") + } +} diff --git a/instrumentation/vertx/vertx-redis-client-4.0/javaagent/build.gradle.kts b/instrumentation/vertx/vertx-redis-client-4.0/javaagent/build.gradle.kts index 0199413110d6..14b2eb7e3253 100644 --- a/instrumentation/vertx/vertx-redis-client-4.0/javaagent/build.gradle.kts +++ b/instrumentation/vertx/vertx-redis-client-4.0/javaagent/build.gradle.kts @@ -20,13 +20,19 @@ dependencies { testLibrary("io.vertx:vertx-codegen:4.0.0") } +val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false" + tasks { withType().configureEach { usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) + systemProperty("collectMetadata", collectMetadata) } val testStableSemconv by registering(Test::class) { jvmArgs("-Dotel.semconv-stability.opt-in=database") + + systemProperty("collectMetadata", collectMetadata) + systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database") } check { diff --git a/instrumentation/vertx/vertx-redis-client-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/redis/VertxRedisClientTest.java b/instrumentation/vertx/vertx-redis-client-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/redis/VertxRedisClientTest.java index e58ba72ddc1e..9a8c32852606 100644 --- a/instrumentation/vertx/vertx-redis-client-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/redis/VertxRedisClientTest.java +++ b/instrumentation/vertx/vertx-redis-client-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/redis/VertxRedisClientTest.java @@ -89,6 +89,12 @@ void setCommand() throws Exception { span.hasName("SET") .hasKind(SpanKind.CLIENT) .hasAttributesSatisfyingExactly(redisSpanAttributes("SET", "SET foo ?")))); + + if (emitStableDatabaseSemconv()) { + testing.waitAndAssertMetrics( + "io.opentelemetry.vertx-redis-client-4.0", + metric -> metric.hasName("db.client.operation.duration")); + } } @Test diff --git a/instrumentation/vertx/vertx-sql-client/vertx-sql-client-4.0/javaagent/build.gradle.kts b/instrumentation/vertx/vertx-sql-client/vertx-sql-client-4.0/javaagent/build.gradle.kts index 88a1a3773624..17ec2393ae82 100644 --- a/instrumentation/vertx/vertx-sql-client/vertx-sql-client-4.0/javaagent/build.gradle.kts +++ b/instrumentation/vertx/vertx-sql-client/vertx-sql-client-4.0/javaagent/build.gradle.kts @@ -28,13 +28,18 @@ dependencies { latestDepTestLibrary("io.vertx:vertx-codegen:4.+") // see vertx-sql-client-5.0 module } +val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false" + tasks { withType().configureEach { usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) + systemProperty("collectMetadata", collectMetadata) } val testStableSemconv by registering(Test::class) { jvmArgs("-Dotel.semconv-stability.opt-in=database") + + systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database") } check { diff --git a/instrumentation/vertx/vertx-sql-client/vertx-sql-client-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/sql/VertxSqlClientTest.java b/instrumentation/vertx/vertx-sql-client/vertx-sql-client-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/sql/VertxSqlClientTest.java index a109c1235019..071e13273563 100644 --- a/instrumentation/vertx/vertx-sql-client/vertx-sql-client-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/sql/VertxSqlClientTest.java +++ b/instrumentation/vertx/vertx-sql-client/vertx-sql-client-4.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v4_0/sql/VertxSqlClientTest.java @@ -231,6 +231,12 @@ void testPreparedSelect() throws Exception { .get(30, TimeUnit.SECONDS); assertPreparedSelect(); + + if (emitStableDatabaseSemconv()) { + testing.waitAndAssertMetrics( + "io.opentelemetry.vertx-sql-client-4.0", + metric -> metric.hasName("db.client.operation.duration")); + } } private static void assertPreparedSelect() { diff --git a/instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0/javaagent/build.gradle.kts b/instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0/javaagent/build.gradle.kts index eb511e08a1c7..dda436b0a7f2 100644 --- a/instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0/javaagent/build.gradle.kts +++ b/instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0/javaagent/build.gradle.kts @@ -28,13 +28,18 @@ dependencies { testLibrary("io.vertx:vertx-pg-client:$version") } +val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false" + tasks { withType().configureEach { usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service) + systemProperty("collectMetadata", collectMetadata) } val testStableSemconv by registering(Test::class) { jvmArgs("-Dotel.semconv-stability.opt-in=database") + + systemProperty("metaDataConfig", "otel.semconv-stability.opt-in=database") } check { diff --git a/instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v5_0/sql/VertxSqlClientTest.java b/instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v5_0/sql/VertxSqlClientTest.java index afaf9e7d6319..fda5e5f4d1e9 100644 --- a/instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v5_0/sql/VertxSqlClientTest.java +++ b/instrumentation/vertx/vertx-sql-client/vertx-sql-client-5.0/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/vertx/v5_0/sql/VertxSqlClientTest.java @@ -156,6 +156,12 @@ void testSimpleSelect() throws Exception { span.hasName("callback") .hasKind(SpanKind.INTERNAL) .hasParent(trace.getSpan(0)))); + + if (emitStableDatabaseSemconv()) { + testing.waitAndAssertMetrics( + "io.opentelemetry.vertx-sql-client-5.0", + metric -> metric.hasName("db.client.operation.duration")); + } } @Test