Introduce instrumentation classifications to metadata (#13672)
This commit is contained in:
parent
377781c93f
commit
6521fc885d
|
@ -2,8 +2,8 @@
|
|||
# The structure and contents are a work in progress and subject to change.
|
||||
# For more information see: https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/13468
|
||||
|
||||
libraries:
|
||||
activej:
|
||||
instrumentations:
|
||||
- name: activej-http-6.0
|
||||
source_path: instrumentation/activej-http-6.0
|
||||
minimum_java_version: 17
|
||||
|
@ -13,7 +13,6 @@ activej:
|
|||
javaagent:
|
||||
- io.activej:activej-http:[6.0,)
|
||||
akka:
|
||||
instrumentations:
|
||||
- name: akka-http-10.0
|
||||
source_path: instrumentation/akka/akka-http-10.0
|
||||
scope:
|
||||
|
@ -42,7 +41,6 @@ akka:
|
|||
- com.typesafe.akka:akka-actor_2.12:[2.3,)
|
||||
- com.typesafe.akka:akka-actor_2.13:[2.3,)
|
||||
alibaba:
|
||||
instrumentations:
|
||||
- name: alibaba-druid-1.0
|
||||
source_path: instrumentation/alibaba-druid-1.0
|
||||
scope:
|
||||
|
@ -53,7 +51,6 @@ alibaba:
|
|||
library:
|
||||
- com.alibaba:druid:1.0.0
|
||||
apache:
|
||||
instrumentations:
|
||||
- name: apache-shenyu-2.4
|
||||
source_path: instrumentation/apache-shenyu-2.4
|
||||
scope:
|
||||
|
@ -121,7 +118,6 @@ apache:
|
|||
library:
|
||||
- org.apache.commons:commons-dbcp2:2.0
|
||||
armeria:
|
||||
instrumentations:
|
||||
- name: armeria-1.3
|
||||
source_path: instrumentation/armeria/armeria-1.3
|
||||
scope:
|
||||
|
@ -139,7 +135,6 @@ armeria:
|
|||
javaagent:
|
||||
- com.linecorp.armeria:armeria-grpc:[1.14.0,)
|
||||
async:
|
||||
instrumentations:
|
||||
- name: async-http-client-1.9
|
||||
source_path: instrumentation/async-http-client/async-http-client-1.9
|
||||
scope:
|
||||
|
@ -155,7 +150,6 @@ async:
|
|||
javaagent:
|
||||
- org.asynchttpclient:async-http-client:[2.0.0,)
|
||||
aws:
|
||||
instrumentations:
|
||||
- name: aws-lambda-events-2.2
|
||||
source_path: instrumentation/aws-lambda/aws-lambda-events-2.2
|
||||
scope:
|
||||
|
@ -204,7 +198,6 @@ aws:
|
|||
- software.amazon.awssdk:sns:2.2.0
|
||||
- software.amazon.awssdk:lambda:2.2.0
|
||||
azure:
|
||||
instrumentations:
|
||||
- name: azure-core-1.36
|
||||
source_path: instrumentation/azure-core/azure-core-1.36
|
||||
scope:
|
||||
|
@ -227,7 +220,6 @@ azure:
|
|||
javaagent:
|
||||
- com.azure:azure-core:[1.14.0,1.19.0)
|
||||
c3p0:
|
||||
instrumentations:
|
||||
- name: c3p0-0.9
|
||||
source_path: instrumentation/c3p0-0.9
|
||||
scope:
|
||||
|
@ -238,7 +230,6 @@ c3p0:
|
|||
library:
|
||||
- com.mchange:c3p0:0.9.2
|
||||
camel:
|
||||
instrumentations:
|
||||
- name: camel-2.20
|
||||
source_path: instrumentation/camel-2.20
|
||||
scope:
|
||||
|
@ -247,7 +238,6 @@ camel:
|
|||
javaagent:
|
||||
- org.apache.camel:camel-core:[2.19,3)
|
||||
cassandra:
|
||||
instrumentations:
|
||||
- name: cassandra-4.0
|
||||
source_path: instrumentation/cassandra/cassandra-4.0
|
||||
scope:
|
||||
|
@ -272,7 +262,6 @@ cassandra:
|
|||
javaagent:
|
||||
- com.datastax.cassandra:cassandra-driver-core:[3.0,4.0)
|
||||
clickhouse:
|
||||
instrumentations:
|
||||
- name: clickhouse-client-0.5
|
||||
description: Instruments the V1 ClickHouseClient, providing database client spans
|
||||
and metrics.
|
||||
|
@ -283,7 +272,6 @@ clickhouse:
|
|||
javaagent:
|
||||
- com.clickhouse.client:clickhouse-client:[0.5.0,)
|
||||
couchbase:
|
||||
instrumentations:
|
||||
- name: couchbase-3.1.6
|
||||
source_path: instrumentation/couchbase/couchbase-3.1.6
|
||||
scope:
|
||||
|
@ -320,7 +308,6 @@ couchbase:
|
|||
javaagent:
|
||||
- com.couchbase.client:java-client:[3.1,3.1.6)
|
||||
dropwizard:
|
||||
instrumentations:
|
||||
- name: dropwizard-metrics-4.0
|
||||
disabled_by_default: true
|
||||
source_path: instrumentation/dropwizard/dropwizard-metrics-4.0
|
||||
|
@ -337,7 +324,6 @@ dropwizard:
|
|||
javaagent:
|
||||
- io.dropwizard:dropwizard-views:(,3.0.0)
|
||||
elasticsearch:
|
||||
instrumentations:
|
||||
- name: elasticsearch-rest-6.4
|
||||
source_path: instrumentation/elasticsearch/elasticsearch-rest-6.4
|
||||
scope:
|
||||
|
@ -395,7 +381,6 @@ elasticsearch:
|
|||
- org.elasticsearch.client:transport:[5.3.0,6.0.0)
|
||||
- org.elasticsearch:elasticsearch:[5.3.0,6.0.0)
|
||||
executors:
|
||||
instrumentations:
|
||||
- name: executors
|
||||
source_path: instrumentation/executors
|
||||
scope:
|
||||
|
@ -404,7 +389,6 @@ executors:
|
|||
javaagent:
|
||||
- Java 8+
|
||||
finagle:
|
||||
instrumentations:
|
||||
- name: finagle-http-23.11
|
||||
source_path: instrumentation/finagle-http-23.11
|
||||
scope:
|
||||
|
@ -414,7 +398,6 @@ finagle:
|
|||
- com.twitter:finagle-http_2.13:[23.11.0,]
|
||||
- com.twitter:finagle-http_2.12:[23.11.0,]
|
||||
finatra:
|
||||
instrumentations:
|
||||
- name: finatra-2.9
|
||||
source_path: instrumentation/finatra-2.9
|
||||
scope:
|
||||
|
@ -424,7 +407,6 @@ finatra:
|
|||
- com.twitter:finatra-http_2.11:[2.9.0,]
|
||||
- com.twitter:finatra-http_2.12:[2.9.0,]
|
||||
geode:
|
||||
instrumentations:
|
||||
- name: geode-1.4
|
||||
source_path: instrumentation/geode-1.4
|
||||
scope:
|
||||
|
@ -433,7 +415,6 @@ geode:
|
|||
javaagent:
|
||||
- org.apache.geode:geode-core:[1.4.0,)
|
||||
google:
|
||||
instrumentations:
|
||||
- name: google-http-client-1.19
|
||||
source_path: instrumentation/google-http-client-1.19
|
||||
scope:
|
||||
|
@ -442,7 +423,6 @@ google:
|
|||
javaagent:
|
||||
- com.google.http-client:google-http-client:[1.19.0,)
|
||||
grails:
|
||||
instrumentations:
|
||||
- name: grails-3.0
|
||||
source_path: instrumentation/grails-3.0
|
||||
scope:
|
||||
|
@ -451,7 +431,6 @@ grails:
|
|||
javaagent:
|
||||
- org.grails:grails-web-url-mappings:[3.0,)
|
||||
graphql:
|
||||
instrumentations:
|
||||
- name: graphql-java-12.0
|
||||
source_path: instrumentation/graphql-java/graphql-java-12.0
|
||||
scope:
|
||||
|
@ -472,7 +451,6 @@ graphql:
|
|||
library:
|
||||
- com.graphql-java:graphql-java:20.0
|
||||
grizzly:
|
||||
instrumentations:
|
||||
- name: grizzly-2.3
|
||||
source_path: instrumentation/grizzly-2.3
|
||||
scope:
|
||||
|
@ -481,7 +459,6 @@ grizzly:
|
|||
javaagent:
|
||||
- org.glassfish.grizzly:grizzly-http:[2.3,)
|
||||
grpc:
|
||||
instrumentations:
|
||||
- name: grpc-1.6
|
||||
source_path: instrumentation/grpc-1.6
|
||||
scope:
|
||||
|
@ -492,7 +469,6 @@ grpc:
|
|||
library:
|
||||
- io.grpc:grpc-core:1.6.0
|
||||
guava:
|
||||
instrumentations:
|
||||
- name: guava-10.0
|
||||
source_path: instrumentation/guava-10.0
|
||||
scope:
|
||||
|
@ -503,7 +479,6 @@ guava:
|
|||
library:
|
||||
- com.google.guava:guava:10.0
|
||||
gwt:
|
||||
instrumentations:
|
||||
- name: gwt-2.0
|
||||
source_path: instrumentation/gwt-2.0
|
||||
scope:
|
||||
|
@ -513,7 +488,6 @@ gwt:
|
|||
- com.google.gwt:gwt-servlet:[2.0.0,)
|
||||
- org.gwtproject:gwt-servlet:[2.10.0,)
|
||||
hibernate:
|
||||
instrumentations:
|
||||
- name: hibernate-4.0
|
||||
source_path: instrumentation/hibernate/hibernate-4.0
|
||||
scope:
|
||||
|
@ -551,7 +525,6 @@ hibernate:
|
|||
javaagent:
|
||||
- org.hibernate.reactive:hibernate-reactive-core:(,)
|
||||
hikaricp:
|
||||
instrumentations:
|
||||
- name: hikaricp-3.0
|
||||
source_path: instrumentation/hikaricp-3.0
|
||||
scope:
|
||||
|
@ -562,7 +535,6 @@ hikaricp:
|
|||
library:
|
||||
- com.zaxxer:HikariCP:3.0.0
|
||||
http:
|
||||
instrumentations:
|
||||
- name: http-url-connection
|
||||
source_path: instrumentation/http-url-connection
|
||||
scope:
|
||||
|
@ -571,7 +543,6 @@ http:
|
|||
javaagent:
|
||||
- Java 8+
|
||||
hystrix:
|
||||
instrumentations:
|
||||
- name: hystrix-1.4
|
||||
source_path: instrumentation/hystrix-1.4
|
||||
scope:
|
||||
|
@ -580,7 +551,6 @@ hystrix:
|
|||
javaagent:
|
||||
- com.netflix.hystrix:hystrix-core:[1.4.0,)
|
||||
influxdb:
|
||||
instrumentations:
|
||||
- name: influxdb-2.4
|
||||
source_path: instrumentation/influxdb-2.4
|
||||
scope:
|
||||
|
@ -589,7 +559,6 @@ influxdb:
|
|||
javaagent:
|
||||
- org.influxdb:influxdb-java:[2.4,)
|
||||
java:
|
||||
instrumentations:
|
||||
- name: java-http-server
|
||||
source_path: instrumentation/java-http-server
|
||||
scope:
|
||||
|
@ -606,7 +575,6 @@ java:
|
|||
javaagent:
|
||||
- Java 11+
|
||||
javalin:
|
||||
instrumentations:
|
||||
- name: javalin-5.0
|
||||
source_path: instrumentation/javalin-5.0
|
||||
minimum_java_version: 11
|
||||
|
@ -616,7 +584,6 @@ javalin:
|
|||
javaagent:
|
||||
- io.javalin:javalin:[5.0.0,)
|
||||
jaxrs:
|
||||
instrumentations:
|
||||
- name: jaxrs-2.0-cxf-3.2
|
||||
source_path: instrumentation/jaxrs/jaxrs-2.0/jaxrs-2.0-cxf-3.2
|
||||
scope:
|
||||
|
@ -693,7 +660,6 @@ jaxrs:
|
|||
javaagent:
|
||||
- javax.ws.rs:jsr311-api:[0.5,)
|
||||
jaxws:
|
||||
instrumentations:
|
||||
- name: jaxws-jws-api-1.1
|
||||
disabled_by_default: true
|
||||
source_path: instrumentation/jaxws/jaxws-jws-api-1.1
|
||||
|
@ -741,7 +707,6 @@ jaxws:
|
|||
javaagent:
|
||||
- com.sun.xml.ws:jaxws-rt:[2.2.0.1,)
|
||||
jboss:
|
||||
instrumentations:
|
||||
- name: jboss-logmanager-appender-1.1
|
||||
source_path: instrumentation/jboss-logmanager/jboss-logmanager-appender-1.1
|
||||
scope:
|
||||
|
@ -757,7 +722,6 @@ jboss:
|
|||
javaagent:
|
||||
- org.jboss.logmanager:jboss-logmanager:[1.1.0.GA,)
|
||||
jdbc:
|
||||
instrumentations:
|
||||
- name: jdbc
|
||||
disabled_by_default: true
|
||||
source_path: instrumentation/jdbc
|
||||
|
@ -767,7 +731,6 @@ jdbc:
|
|||
javaagent:
|
||||
- Java 8+
|
||||
jedis:
|
||||
instrumentations:
|
||||
- name: jedis-1.4
|
||||
source_path: instrumentation/jedis/jedis-1.4
|
||||
scope:
|
||||
|
@ -790,7 +753,6 @@ jedis:
|
|||
javaagent:
|
||||
- redis.clients:jedis:[3.0.0,4)
|
||||
jetty:
|
||||
instrumentations:
|
||||
- name: jetty-httpclient-12.0
|
||||
source_path: instrumentation/jetty-httpclient/jetty-httpclient-12.0
|
||||
minimum_java_version: 17
|
||||
|
@ -834,7 +796,6 @@ jetty:
|
|||
javaagent:
|
||||
- org.eclipse.jetty:jetty-server:[11, 12)
|
||||
jms:
|
||||
instrumentations:
|
||||
- name: jms-3.0
|
||||
source_path: instrumentation/jms/jms-3.0
|
||||
minimum_java_version: 11
|
||||
|
@ -853,7 +814,6 @@ jms:
|
|||
- jakarta.jms:jakarta.jms-api:(,3)
|
||||
- javax.jms:jms-api:(,)
|
||||
jodd:
|
||||
instrumentations:
|
||||
- name: jodd-http-4.2
|
||||
source_path: instrumentation/jodd-http-4.2
|
||||
scope:
|
||||
|
@ -862,7 +822,6 @@ jodd:
|
|||
javaagent:
|
||||
- org.jodd:jodd-http:[4.2.0,)
|
||||
jsf:
|
||||
instrumentations:
|
||||
- name: jsf-myfaces-3.0
|
||||
source_path: instrumentation/jsf/jsf-myfaces-3.0
|
||||
minimum_java_version: 11
|
||||
|
@ -898,7 +857,6 @@ jsf:
|
|||
- org.glassfish:javax.faces:[2.0.7,3)
|
||||
- javax.faces:jsf-impl:[1.2,2)
|
||||
jsp:
|
||||
instrumentations:
|
||||
- name: jsp-2.3
|
||||
source_path: instrumentation/jsp-2.3
|
||||
scope:
|
||||
|
@ -907,7 +865,6 @@ jsp:
|
|||
javaagent:
|
||||
- org.apache.tomcat:tomcat-jasper:[7.0.19,10)
|
||||
kafka:
|
||||
instrumentations:
|
||||
- name: kafka-streams-0.11
|
||||
source_path: instrumentation/kafka/kafka-streams-0.11
|
||||
scope:
|
||||
|
@ -930,7 +887,6 @@ kafka:
|
|||
javaagent:
|
||||
- org.apache.kafka:kafka-clients:[0.11.0.0,)
|
||||
kotlinx:
|
||||
instrumentations:
|
||||
- name: kotlinx-coroutines
|
||||
source_path: instrumentation/kotlinx-coroutines
|
||||
scope:
|
||||
|
@ -957,7 +913,6 @@ kotlinx:
|
|||
- org.jetbrains.kotlinx:kotlinx-coroutines-core:[1.3.0,1.3.8)
|
||||
- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:[1.3.9,)
|
||||
ktor:
|
||||
instrumentations:
|
||||
- name: ktor-2.0
|
||||
source_path: instrumentation/ktor/ktor-2.0
|
||||
scope:
|
||||
|
@ -988,7 +943,6 @@ ktor:
|
|||
library:
|
||||
- io.ktor:ktor-server-core:[1.0.0,1.+)
|
||||
kubernetes:
|
||||
instrumentations:
|
||||
- name: kubernetes-client-7.0
|
||||
source_path: instrumentation/kubernetes-client-7.0
|
||||
scope:
|
||||
|
@ -997,7 +951,6 @@ kubernetes:
|
|||
javaagent:
|
||||
- io.kubernetes:client-java-api:[7.0.0,)
|
||||
lettuce:
|
||||
instrumentations:
|
||||
- name: lettuce-5.1
|
||||
source_path: instrumentation/lettuce/lettuce-5.1
|
||||
scope:
|
||||
|
@ -1022,7 +975,6 @@ lettuce:
|
|||
javaagent:
|
||||
- biz.paluch.redis:lettuce:[4.0.Final,)
|
||||
liberty:
|
||||
instrumentations:
|
||||
- name: liberty-dispatcher-20.0
|
||||
source_path: instrumentation/liberty/liberty-dispatcher-20.0
|
||||
scope:
|
||||
|
@ -1034,7 +986,6 @@ liberty:
|
|||
name: io.opentelemetry.liberty-20.0
|
||||
target_versions: {}
|
||||
log4j:
|
||||
instrumentations:
|
||||
- name: log4j-context-data-2.7
|
||||
source_path: instrumentation/log4j/log4j-context-data/log4j-context-data-2.7
|
||||
scope:
|
||||
|
@ -1073,7 +1024,6 @@ log4j:
|
|||
javaagent:
|
||||
- org.apache.logging.log4j:log4j-core:[2.17.0,)
|
||||
logback:
|
||||
instrumentations:
|
||||
- name: logback-mdc-1.0
|
||||
source_path: instrumentation/logback/logback-mdc-1.0
|
||||
scope:
|
||||
|
@ -1096,7 +1046,6 @@ logback:
|
|||
- org.slf4j:slf4j-api:2.0.0
|
||||
- ch.qos.logback:logback-classic:1.3.0
|
||||
micrometer:
|
||||
instrumentations:
|
||||
- name: micrometer-1.5
|
||||
disabled_by_default: true
|
||||
source_path: instrumentation/micrometer/micrometer-1.5
|
||||
|
@ -1108,7 +1057,6 @@ micrometer:
|
|||
library:
|
||||
- io.micrometer:micrometer-core:1.5.0
|
||||
mongo:
|
||||
instrumentations:
|
||||
- name: mongo-4.0
|
||||
source_path: instrumentation/mongo/mongo-4.0
|
||||
scope:
|
||||
|
@ -1141,7 +1089,6 @@ mongo:
|
|||
javaagent:
|
||||
- org.mongodb:mongodb-driver-async:[3.3,)
|
||||
mybatis:
|
||||
instrumentations:
|
||||
- name: mybatis-3.2
|
||||
disabled_by_default: true
|
||||
source_path: instrumentation/mybatis-3.2
|
||||
|
@ -1151,7 +1098,6 @@ mybatis:
|
|||
javaagent:
|
||||
- org.mybatis:mybatis:[3.2.0,)
|
||||
netty:
|
||||
instrumentations:
|
||||
- name: netty-3.8
|
||||
source_path: instrumentation/netty/netty-3.8
|
||||
scope:
|
||||
|
@ -1178,7 +1124,6 @@ netty:
|
|||
library:
|
||||
- io.netty:netty-codec-http:4.1.0.Final
|
||||
okhttp:
|
||||
instrumentations:
|
||||
- name: okhttp-3.0
|
||||
source_path: instrumentation/okhttp/okhttp-3.0
|
||||
scope:
|
||||
|
@ -1196,7 +1141,6 @@ okhttp:
|
|||
javaagent:
|
||||
- com.squareup.okhttp:okhttp:[2.2,3)
|
||||
opensearch:
|
||||
instrumentations:
|
||||
- name: opensearch-rest-1.0
|
||||
source_path: instrumentation/opensearch/opensearch-rest-1.0
|
||||
minimum_java_version: 11
|
||||
|
@ -1206,7 +1150,6 @@ opensearch:
|
|||
javaagent:
|
||||
- org.opensearch.client:opensearch-rest-client:[1.0,)
|
||||
oracle:
|
||||
instrumentations:
|
||||
- name: oracle-ucp-11.2
|
||||
source_path: instrumentation/oracle-ucp-11.2
|
||||
scope:
|
||||
|
@ -1218,7 +1161,6 @@ oracle:
|
|||
- com.oracle.database.jdbc:ucp:11.2.0.4
|
||||
- com.oracle.database.jdbc:ojdbc8:12.2.0.1
|
||||
oshi:
|
||||
instrumentations:
|
||||
- name: oshi
|
||||
source_path: instrumentation/oshi
|
||||
scope:
|
||||
|
@ -1229,14 +1171,12 @@ oshi:
|
|||
library:
|
||||
- com.github.oshi:oshi-core:5.3.1
|
||||
payara:
|
||||
instrumentations:
|
||||
- name: payara
|
||||
source_path: instrumentation/payara
|
||||
scope:
|
||||
name: io.opentelemetry.payara
|
||||
target_versions: {}
|
||||
pekko:
|
||||
instrumentations:
|
||||
- name: pekko-actor-1.0
|
||||
source_path: instrumentation/pekko/pekko-actor-1.0
|
||||
scope:
|
||||
|
@ -1259,7 +1199,6 @@ pekko:
|
|||
- com.softwaremill.sttp.tapir:tapir-pekko-http-server_2.13:[1.7,)
|
||||
- org.apache.pekko:pekko-http_2.13:[1.0,)
|
||||
play:
|
||||
instrumentations:
|
||||
- name: play-ws-1.0
|
||||
source_path: instrumentation/play/play-ws/play-ws-1.0
|
||||
scope:
|
||||
|
@ -1302,7 +1241,6 @@ play:
|
|||
- com.typesafe.play:play-ahc-ws-standalone_2.13:[2.1.0,]
|
||||
- com.typesafe.play:play-ahc-ws-standalone_2.12:[2.1.0,]
|
||||
powerjob:
|
||||
instrumentations:
|
||||
- name: powerjob-4.0
|
||||
source_path: instrumentation/powerjob-4.0
|
||||
scope:
|
||||
|
@ -1311,7 +1249,6 @@ powerjob:
|
|||
javaagent:
|
||||
- tech.powerjob:powerjob-worker:[4.0.0,)
|
||||
pulsar:
|
||||
instrumentations:
|
||||
- name: pulsar-2.8
|
||||
source_path: instrumentation/pulsar/pulsar-2.8
|
||||
scope:
|
||||
|
@ -1320,7 +1257,6 @@ pulsar:
|
|||
javaagent:
|
||||
- org.apache.pulsar:pulsar-client:[2.8.0,)
|
||||
quarkus:
|
||||
instrumentations:
|
||||
- name: quarkus-resteasy-reactive
|
||||
source_path: instrumentation/quarkus-resteasy-reactive
|
||||
scope:
|
||||
|
@ -1329,7 +1265,6 @@ quarkus:
|
|||
javaagent:
|
||||
- io.quarkus:quarkus-resteasy-reactive:(,3.9.0)
|
||||
quartz:
|
||||
instrumentations:
|
||||
- name: quartz-2.0
|
||||
source_path: instrumentation/quartz-2.0
|
||||
scope:
|
||||
|
@ -1340,7 +1275,6 @@ quartz:
|
|||
library:
|
||||
- org.quartz-scheduler:quartz:2.0.0
|
||||
r2dbc:
|
||||
instrumentations:
|
||||
- name: r2dbc-1.0
|
||||
source_path: instrumentation/r2dbc-1.0
|
||||
scope:
|
||||
|
@ -1351,7 +1285,6 @@ r2dbc:
|
|||
library:
|
||||
- io.r2dbc:r2dbc-spi:1.0.0.RELEASE
|
||||
rabbitmq:
|
||||
instrumentations:
|
||||
- name: rabbitmq-2.7
|
||||
source_path: instrumentation/rabbitmq-2.7
|
||||
scope:
|
||||
|
@ -1360,7 +1293,6 @@ rabbitmq:
|
|||
javaagent:
|
||||
- com.rabbitmq:amqp-client:[2.7.0,)
|
||||
ratpack:
|
||||
instrumentations:
|
||||
- name: ratpack-1.4
|
||||
source_path: instrumentation/ratpack/ratpack-1.4
|
||||
scope:
|
||||
|
@ -1378,7 +1310,6 @@ ratpack:
|
|||
library:
|
||||
- io.ratpack:ratpack-core:1.7.0
|
||||
reactor:
|
||||
instrumentations:
|
||||
- name: reactor-kafka-1.0
|
||||
source_path: instrumentation/reactor/reactor-kafka-1.0
|
||||
scope:
|
||||
|
@ -1416,7 +1347,6 @@ reactor:
|
|||
- io.projectreactor.netty:reactor-netty-http:[1.0.0,)
|
||||
- io.projectreactor.netty:reactor-netty:[1.0.0,)
|
||||
rediscala:
|
||||
instrumentations:
|
||||
- name: rediscala-1.8
|
||||
source_path: instrumentation/rediscala-1.8
|
||||
scope:
|
||||
|
@ -1431,7 +1361,6 @@ rediscala:
|
|||
- com.github.etaty:rediscala_2.13:[1.9.0,)
|
||||
- com.github.Ma27:rediscala_2.12:[1.8.1,)
|
||||
redisson:
|
||||
instrumentations:
|
||||
- name: redisson-3.17
|
||||
source_path: instrumentation/redisson/redisson-3.17
|
||||
scope:
|
||||
|
@ -1447,14 +1376,12 @@ redisson:
|
|||
javaagent:
|
||||
- org.redisson:redisson:[3.0.0,3.17.0)
|
||||
resources:
|
||||
instrumentations:
|
||||
- name: resources
|
||||
source_path: instrumentation/resources
|
||||
scope:
|
||||
name: io.opentelemetry.resources
|
||||
target_versions: {}
|
||||
restlet:
|
||||
instrumentations:
|
||||
- name: restlet-1.1
|
||||
source_path: instrumentation/restlet/restlet-1.1
|
||||
scope:
|
||||
|
@ -1475,7 +1402,6 @@ restlet:
|
|||
library:
|
||||
- org.restlet.jse:org.restlet:2.0.2
|
||||
rmi:
|
||||
instrumentations:
|
||||
- name: rmi
|
||||
source_path: instrumentation/rmi
|
||||
scope:
|
||||
|
@ -1484,7 +1410,6 @@ rmi:
|
|||
javaagent:
|
||||
- Java 8+
|
||||
rocketmq:
|
||||
instrumentations:
|
||||
- name: rocketmq-client-5.0
|
||||
source_path: instrumentation/rocketmq/rocketmq-client/rocketmq-client-5.0
|
||||
scope:
|
||||
|
@ -1502,7 +1427,6 @@ rocketmq:
|
|||
library:
|
||||
- org.apache.rocketmq:rocketmq-client:4.8.0
|
||||
runtime:
|
||||
instrumentations:
|
||||
- name: runtime-telemetry-java17
|
||||
source_path: instrumentation/runtime-telemetry/runtime-telemetry-java17
|
||||
minimum_java_version: 17
|
||||
|
@ -1515,7 +1439,6 @@ runtime:
|
|||
name: io.opentelemetry.runtime-telemetry-java8
|
||||
target_versions: {}
|
||||
rxjava:
|
||||
instrumentations:
|
||||
- name: rxjava-1.0
|
||||
source_path: instrumentation/rxjava/rxjava-1.0
|
||||
scope:
|
||||
|
@ -1551,7 +1474,6 @@ rxjava:
|
|||
library:
|
||||
- io.reactivex.rxjava3:rxjava:[3.0.12,3.1.0)
|
||||
scala:
|
||||
instrumentations:
|
||||
- name: scala-fork-join-2.8
|
||||
source_path: instrumentation/scala-fork-join-2.8
|
||||
scope:
|
||||
|
@ -1560,7 +1482,6 @@ scala:
|
|||
javaagent:
|
||||
- org.scala-lang:scala-library:[2.8.0,2.12.0)
|
||||
servlet:
|
||||
instrumentations:
|
||||
- name: servlet-5.0
|
||||
source_path: instrumentation/servlet/servlet-5.0
|
||||
scope:
|
||||
|
@ -1583,7 +1504,6 @@ servlet:
|
|||
javaagent:
|
||||
- javax.servlet:javax.servlet-api:[3.0,)
|
||||
spark:
|
||||
instrumentations:
|
||||
- name: spark-2.3
|
||||
source_path: instrumentation/spark-2.3
|
||||
scope:
|
||||
|
@ -1592,7 +1512,6 @@ spark:
|
|||
javaagent:
|
||||
- com.sparkjava:spark-core:[2.3,)
|
||||
spring:
|
||||
instrumentations:
|
||||
- name: spring-rabbit-1.0
|
||||
source_path: instrumentation/spring/spring-rabbit-1.0
|
||||
scope:
|
||||
|
@ -1778,7 +1697,6 @@ spring:
|
|||
javaagent:
|
||||
- org.springframework:spring-web:[6.0.0,)
|
||||
spymemcached:
|
||||
instrumentations:
|
||||
- name: spymemcached-2.12
|
||||
source_path: instrumentation/spymemcached-2.12
|
||||
scope:
|
||||
|
@ -1787,7 +1705,6 @@ spymemcached:
|
|||
javaagent:
|
||||
- net.spy:spymemcached:[2.12.0,)
|
||||
struts:
|
||||
instrumentations:
|
||||
- name: struts-2.3
|
||||
source_path: instrumentation/struts/struts-2.3
|
||||
scope:
|
||||
|
@ -1804,7 +1721,6 @@ struts:
|
|||
javaagent:
|
||||
- org.apache.struts:struts2-core:[7.0.0,)
|
||||
tapestry:
|
||||
instrumentations:
|
||||
- name: tapestry-5.4
|
||||
source_path: instrumentation/tapestry-5.4
|
||||
scope:
|
||||
|
@ -1813,7 +1729,6 @@ tapestry:
|
|||
javaagent:
|
||||
- org.apache.tapestry:tapestry-core:[5.4.0,)
|
||||
tomcat:
|
||||
instrumentations:
|
||||
- name: tomcat-10.0
|
||||
source_path: instrumentation/tomcat/tomcat-10.0
|
||||
minimum_java_version: 11
|
||||
|
@ -1837,7 +1752,6 @@ tomcat:
|
|||
javaagent:
|
||||
- org.apache.tomcat:tomcat-jdbc:[8.5.0,)
|
||||
twilio:
|
||||
instrumentations:
|
||||
- name: twilio-6.6
|
||||
source_path: instrumentation/twilio-6.6
|
||||
scope:
|
||||
|
@ -1846,7 +1760,6 @@ twilio:
|
|||
javaagent:
|
||||
- com.twilio.sdk:twilio:(,8.0.0)
|
||||
undertow:
|
||||
instrumentations:
|
||||
- name: undertow-1.4
|
||||
source_path: instrumentation/undertow-1.4
|
||||
scope:
|
||||
|
@ -1855,7 +1768,6 @@ undertow:
|
|||
javaagent:
|
||||
- io.undertow:undertow-core:[1.4.0.Final,)
|
||||
vaadin:
|
||||
instrumentations:
|
||||
- name: vaadin-14.2
|
||||
source_path: instrumentation/vaadin-14.2
|
||||
scope:
|
||||
|
@ -1865,7 +1777,6 @@ vaadin:
|
|||
- com.vaadin:flow-server:[2.2.0,3)
|
||||
- com.vaadin:flow-server:[3.1.0,)
|
||||
vertx:
|
||||
instrumentations:
|
||||
- name: vertx-kafka-client-3.6
|
||||
source_path: instrumentation/vertx/vertx-kafka-client-3.6
|
||||
scope:
|
||||
|
@ -1916,7 +1827,6 @@ vertx:
|
|||
javaagent:
|
||||
- io.vertx:vertx-core:[3.0.0,4.0.0)
|
||||
vibur:
|
||||
instrumentations:
|
||||
- name: vibur-dbcp-11.0
|
||||
source_path: instrumentation/vibur-dbcp-11.0
|
||||
scope:
|
||||
|
@ -1927,7 +1837,6 @@ vibur:
|
|||
library:
|
||||
- org.vibur:vibur-dbcp:11.0
|
||||
wicket:
|
||||
instrumentations:
|
||||
- name: wicket-8.0
|
||||
source_path: instrumentation/wicket-8.0
|
||||
scope:
|
||||
|
@ -1936,7 +1845,6 @@ wicket:
|
|||
javaagent:
|
||||
- org.apache.wicket:wicket:[8.0.0,]
|
||||
xxl:
|
||||
instrumentations:
|
||||
- name: xxl-job-2.3.0
|
||||
source_path: instrumentation/xxl-job/xxl-job-2.3.0
|
||||
scope:
|
||||
|
@ -1959,7 +1867,6 @@ xxl:
|
|||
javaagent:
|
||||
- com.xuxueli:xxl-job-core:[1.9.2, 2.1.2)
|
||||
zio:
|
||||
instrumentations:
|
||||
- name: zio-2.0
|
||||
source_path: instrumentation/zio/zio-2.0
|
||||
scope:
|
||||
|
@ -1969,3 +1876,109 @@ zio:
|
|||
- dev.zio:zio_2.13:[2.0.0,)
|
||||
- dev.zio:zio_3:[2.0.0,)
|
||||
- dev.zio:zio_2.12:[2.0.0,)
|
||||
internal:
|
||||
- name: opentelemetry-api-1.15
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.15
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.15
|
||||
- name: opentelemetry-api-1.10
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.10
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.10
|
||||
- name: opentelemetry-api-1.27
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.27
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.27
|
||||
- name: internal-application-logger
|
||||
source_path: instrumentation/internal/internal-application-logger
|
||||
scope:
|
||||
name: io.opentelemetry.internal-application-logger
|
||||
- name: internal-class-loader
|
||||
source_path: instrumentation/internal/internal-class-loader
|
||||
scope:
|
||||
name: io.opentelemetry.internal-class-loader
|
||||
- name: java-util-logging
|
||||
source_path: instrumentation/java-util-logging
|
||||
scope:
|
||||
name: io.opentelemetry.java-util-logging
|
||||
- name: internal-reflection
|
||||
source_path: instrumentation/internal/internal-reflection
|
||||
scope:
|
||||
name: io.opentelemetry.internal-reflection
|
||||
- name: opentelemetry-instrumentation-api
|
||||
source_path: instrumentation/opentelemetry-instrumentation-api
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-instrumentation-api
|
||||
- name: opentelemetry-api-1.37
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.37
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.37
|
||||
- name: opentelemetry-api-1.38
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.38
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.38
|
||||
- name: opentelemetry-api-1.31
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.31
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.31
|
||||
- name: opentelemetry-api-1.32
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.32
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.32
|
||||
- name: opentelemetry-api-1.42
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.42
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.42
|
||||
- name: opentelemetry-api-1.40
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.40
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.40
|
||||
- name: opentelemetry-api-1.47
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.47
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.47
|
||||
- name: internal-lambda
|
||||
source_path: instrumentation/internal/internal-lambda
|
||||
scope:
|
||||
name: io.opentelemetry.internal-lambda
|
||||
- name: internal-eclipse-osgi-3.6
|
||||
source_path: instrumentation/internal/internal-eclipse-osgi-3.6
|
||||
scope:
|
||||
name: io.opentelemetry.internal-eclipse-osgi-3.6
|
||||
- name: internal-url-class-loader
|
||||
source_path: instrumentation/internal/internal-url-class-loader
|
||||
scope:
|
||||
name: io.opentelemetry.internal-url-class-loader
|
||||
- name: opentelemetry-api-1.4
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.4
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.4
|
||||
- name: opentelemetry-api-1.0
|
||||
source_path: instrumentation/opentelemetry-api/opentelemetry-api-1.0
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-api-1.0
|
||||
custom:
|
||||
- name: external-annotations
|
||||
source_path: instrumentation/external-annotations
|
||||
scope:
|
||||
name: io.opentelemetry.external-annotations
|
||||
- name: opentelemetry-extension-annotations-1.0
|
||||
source_path: instrumentation/opentelemetry-extension-annotations-1.0
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-extension-annotations-1.0
|
||||
- name: opentelemetry-instrumentation-annotations-1.16
|
||||
source_path: instrumentation/opentelemetry-instrumentation-annotations-1.16
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-instrumentation-annotations-1.16
|
||||
- name: jmx-metrics
|
||||
source_path: instrumentation/jmx-metrics
|
||||
scope:
|
||||
name: io.opentelemetry.jmx-metrics
|
||||
- name: methods
|
||||
source_path: instrumentation/methods
|
||||
scope:
|
||||
name: io.opentelemetry.methods
|
||||
- name: opentelemetry-extension-kotlin-1.0
|
||||
source_path: instrumentation/opentelemetry-extension-kotlin-1.0
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-extension-kotlin-1.0
|
||||
|
|
|
@ -10,8 +10,8 @@ Run the doc generator:
|
|||
|
||||
## Instrumentation Hierarchy
|
||||
|
||||
An "InstrumentationEntity" represents a module that that targets specific code in a framework/library/technology.
|
||||
Each instrumentation uses muzzle to determine which versions of the target code it supports.
|
||||
An "InstrumentationEntity" represents a module that that targets specific code in a
|
||||
framework/library/technology. Each entity will have a name, a namespace, and a group.
|
||||
|
||||
Using these structures as examples:
|
||||
|
||||
|
@ -28,8 +28,10 @@ Using these structures as examples:
|
|||
│ │ │ └── spring-cloud-gateway-common
|
||||
```
|
||||
|
||||
* Name
|
||||
* Ex: `clickhouse-client-05`, `jaxrs-1.0`, `spring-cloud-gateway-2.0`
|
||||
Results in the following:
|
||||
|
||||
* Name - the full name of the instrumentation module
|
||||
* `clickhouse-client-05`, `jaxrs-1.0`, `spring-cloud-gateway-2.0`
|
||||
* Namespace - direct parent. if none, use name and strip version
|
||||
* `clickhouse-client`, `jaxrs`, `spring-cloud-gateway`
|
||||
* Group - top most parent
|
||||
|
@ -47,6 +49,10 @@ public class SpringWebInstrumentationModule extends InstrumentationModule
|
|||
|
||||
## Instrumentation metadata
|
||||
|
||||
* classification
|
||||
* `library` - Instrumentation that targets a library
|
||||
* `internal` - Instrumentation that is used internally by the OpenTelemetry Java Agent
|
||||
* `custom` - Utilities that are used to create custom instrumentation
|
||||
* name
|
||||
* Identifier for instrumentation module, used to enable/disable
|
||||
* Configured in `InstrumentationModule` code for each module
|
||||
|
@ -69,15 +75,12 @@ public class SpringWebInstrumentationModule extends InstrumentationModule
|
|||
Within each instrumentation source directory, a `metadata.yaml` file can be created to provide
|
||||
additional information about the instrumentation module.
|
||||
|
||||
As of now, the following fields are supported:
|
||||
As of now, the following fields are supported, all of which are optional:
|
||||
|
||||
```yaml
|
||||
description: "Description of what the instrumentation does."
|
||||
disabled_by_default: true
|
||||
|
||||
# used to mark modules that do not instrument traditional libraries (e.g. methods, annotations)
|
||||
# defaults to true
|
||||
isLibraryInstrumentation: false
|
||||
description: "Instruments..." # Description of the instrumentation module
|
||||
disabled_by_default: true # Defaults to `false`
|
||||
classification: internal # instrumentation classification: library | internal | custom
|
||||
```
|
||||
|
||||
### Gradle File Derived Information
|
||||
|
|
|
@ -31,7 +31,7 @@ public class DocGeneratorApplication {
|
|||
writer.write("# The structure and contents are a work in progress and subject to change.\n");
|
||||
writer.write(
|
||||
"# For more information see: https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/13468\n\n");
|
||||
YamlHelper.printInstrumentationList(entities, writer);
|
||||
YamlHelper.generateInstrumentationYaml(entities, writer);
|
||||
} catch (IOException e) {
|
||||
logger.severe("Error writing instrumentation list: " + e.getMessage());
|
||||
}
|
||||
|
|
|
@ -22,20 +22,17 @@ import java.util.Set;
|
|||
|
||||
class InstrumentationAnalyzer {
|
||||
|
||||
private final FileManager fileSearch;
|
||||
private final FileManager fileManager;
|
||||
|
||||
InstrumentationAnalyzer(FileManager fileSearch) {
|
||||
this.fileSearch = fileSearch;
|
||||
InstrumentationAnalyzer(FileManager fileManager) {
|
||||
this.fileManager = fileManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a list of InstrumentationPath objects into a list of InstrumentationEntity objects.
|
||||
* Each InstrumentationEntity represents a unique combination of group, namespace, and
|
||||
* instrumentation name. The types of instrumentation (e.g., library, javaagent) are aggregated
|
||||
* into a list within each entity.
|
||||
* Converts a list of {@link InstrumentationPath} into a list of {@link InstrumentationEntity},
|
||||
*
|
||||
* @param paths the list of InstrumentationPath objects to be converted
|
||||
* @return a list of InstrumentationEntity objects with aggregated types
|
||||
* @param paths the list of {@link InstrumentationPath} objects to be converted
|
||||
* @return a list of {@link InstrumentationEntity} objects with aggregated types
|
||||
*/
|
||||
public static List<InstrumentationEntity> convertToEntities(List<InstrumentationPath> paths) {
|
||||
Map<String, InstrumentationEntity> entityMap = new HashMap<>();
|
||||
|
@ -62,17 +59,17 @@ class InstrumentationAnalyzer {
|
|||
* Extracts version information from each instrumentation's build.gradle file. Extracts
|
||||
* information from metadata.yaml files.
|
||||
*
|
||||
* @return a list of InstrumentationEntity objects with target versions
|
||||
* @return a list of {@link InstrumentationEntity}
|
||||
*/
|
||||
List<InstrumentationEntity> analyze() {
|
||||
List<InstrumentationPath> paths = fileSearch.getInstrumentationPaths();
|
||||
List<InstrumentationPath> paths = fileManager.getInstrumentationPaths();
|
||||
List<InstrumentationEntity> entities = convertToEntities(paths);
|
||||
|
||||
for (InstrumentationEntity entity : entities) {
|
||||
List<String> gradleFiles = fileSearch.findBuildGradleFiles(entity.getSrcPath());
|
||||
List<String> gradleFiles = fileManager.findBuildGradleFiles(entity.getSrcPath());
|
||||
analyzeVersions(gradleFiles, entity);
|
||||
|
||||
String metadataFile = fileSearch.getMetaDataFile(entity.getSrcPath());
|
||||
String metadataFile = fileManager.getMetaDataFile(entity.getSrcPath());
|
||||
if (metadataFile != null) {
|
||||
entity.setMetadata(YamlHelper.metaDataParser(metadataFile));
|
||||
}
|
||||
|
@ -83,7 +80,7 @@ class InstrumentationAnalyzer {
|
|||
void analyzeVersions(List<String> files, InstrumentationEntity entity) {
|
||||
Map<InstrumentationType, Set<String>> versions = new HashMap<>();
|
||||
for (String file : files) {
|
||||
String fileContents = fileSearch.readFileToString(file);
|
||||
String fileContents = fileManager.readFileToString(file);
|
||||
DependencyInfo results = null;
|
||||
|
||||
if (file.contains("/javaagent/")) {
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright The OpenTelemetry Authors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package io.opentelemetry.instrumentation.docs.internal;
|
||||
|
||||
import java.util.Locale;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* This class is internal and is hence not for public use. Its APIs are unstable and can change at
|
||||
* any time.
|
||||
*/
|
||||
public enum InstrumentationClassification {
|
||||
LIBRARY,
|
||||
CUSTOM,
|
||||
INTERNAL;
|
||||
|
||||
@Nullable
|
||||
public static InstrumentationClassification fromString(@Nullable String type) {
|
||||
if (type == null) {
|
||||
return null;
|
||||
}
|
||||
return switch (type.toLowerCase(Locale.getDefault())) {
|
||||
case "library" -> LIBRARY;
|
||||
case "internal" -> INTERNAL;
|
||||
case "custom" -> CUSTOM;
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name().toLowerCase(Locale.getDefault());
|
||||
}
|
||||
}
|
|
@ -70,8 +70,11 @@ public class InstrumentationEntity {
|
|||
return scopeInfo;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public InstrumentationMetaData getMetadata() {
|
||||
if (metadata == null) {
|
||||
metadata = new InstrumentationMetaData();
|
||||
}
|
||||
|
||||
return metadata;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
package io.opentelemetry.instrumentation.docs.internal;
|
||||
|
||||
import java.util.Objects;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
|
@ -14,18 +15,14 @@ import javax.annotation.Nullable;
|
|||
*/
|
||||
public class InstrumentationMetaData {
|
||||
@Nullable private String description;
|
||||
@Nullable private Boolean isLibraryInstrumentation;
|
||||
@Nullable private Boolean disabledByDefault;
|
||||
private String classification;
|
||||
|
||||
public InstrumentationMetaData() {}
|
||||
|
||||
public InstrumentationMetaData(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public InstrumentationMetaData(
|
||||
String description, Boolean isLibraryInstrumentation, Boolean disabledByDefault) {
|
||||
this.isLibraryInstrumentation = isLibraryInstrumentation;
|
||||
String description, String classification, Boolean disabledByDefault) {
|
||||
this.classification = classification;
|
||||
this.disabledByDefault = disabledByDefault;
|
||||
this.description = description;
|
||||
}
|
||||
|
@ -35,8 +32,11 @@ public class InstrumentationMetaData {
|
|||
return description;
|
||||
}
|
||||
|
||||
public Boolean getIsLibraryInstrumentation() {
|
||||
return Objects.requireNonNullElse(isLibraryInstrumentation, true);
|
||||
@Nonnull
|
||||
public InstrumentationClassification getClassification() {
|
||||
return Objects.requireNonNullElse(
|
||||
InstrumentationClassification.fromString(classification),
|
||||
InstrumentationClassification.LIBRARY);
|
||||
}
|
||||
|
||||
public Boolean getDisabledByDefault() {
|
||||
|
@ -47,8 +47,8 @@ public class InstrumentationMetaData {
|
|||
this.description = description;
|
||||
}
|
||||
|
||||
public void setIsLibraryInstrumentation(@Nullable Boolean libraryInstrumentation) {
|
||||
isLibraryInstrumentation = libraryInstrumentation;
|
||||
public void setClassification(@Nullable String classification) {
|
||||
this.classification = classification;
|
||||
}
|
||||
|
||||
public void setDisabledByDefault(@Nullable Boolean disabledByDefault) {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
package io.opentelemetry.instrumentation.docs.utils;
|
||||
|
||||
import io.opentelemetry.instrumentation.docs.internal.InstrumentationClassification;
|
||||
import io.opentelemetry.instrumentation.docs.internal.InstrumentationEntity;
|
||||
import io.opentelemetry.instrumentation.docs.internal.InstrumentationMetaData;
|
||||
import java.io.BufferedWriter;
|
||||
|
@ -26,24 +27,101 @@ public class YamlHelper {
|
|||
TypeDescription customDescriptor = new TypeDescription(InstrumentationMetaData.class);
|
||||
customDescriptor.substituteProperty(
|
||||
"disabled_by_default", Boolean.class, "getDisabledByDefault", "setDisabledByDefault");
|
||||
customDescriptor.substituteProperty(
|
||||
"classification", String.class, "getClassification", "setClassification");
|
||||
metaDataYaml.addTypeDescription(customDescriptor);
|
||||
}
|
||||
|
||||
public static void printInstrumentationList(
|
||||
public static void generateInstrumentationYaml(
|
||||
List<InstrumentationEntity> list, BufferedWriter writer) {
|
||||
Map<String, List<InstrumentationEntity>> groupedByGroup =
|
||||
DumperOptions options = new DumperOptions();
|
||||
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||
|
||||
Yaml yaml = new Yaml(options);
|
||||
|
||||
Map<String, Object> libraries = getLibraryInstrumentations(list);
|
||||
if (!libraries.isEmpty()) {
|
||||
yaml.dump(getLibraryInstrumentations(list), writer);
|
||||
}
|
||||
|
||||
Map<String, Object> internal = generateBaseYaml(list, InstrumentationClassification.INTERNAL);
|
||||
if (!internal.isEmpty()) {
|
||||
yaml.dump(internal, writer);
|
||||
}
|
||||
|
||||
Map<String, Object> custom = generateBaseYaml(list, InstrumentationClassification.CUSTOM);
|
||||
if (!custom.isEmpty()) {
|
||||
yaml.dump(custom, writer);
|
||||
}
|
||||
}
|
||||
|
||||
private static Map<String, Object> getLibraryInstrumentations(List<InstrumentationEntity> list) {
|
||||
Map<String, List<InstrumentationEntity>> libraryInstrumentations =
|
||||
list.stream()
|
||||
.filter(entity -> isLibraryInstrumentation(entity.getMetadata()))
|
||||
.filter(
|
||||
entity ->
|
||||
entity
|
||||
.getMetadata()
|
||||
.getClassification()
|
||||
.equals(InstrumentationClassification.LIBRARY))
|
||||
.collect(
|
||||
Collectors.groupingBy(
|
||||
InstrumentationEntity::getGroup, TreeMap::new, Collectors.toList()));
|
||||
|
||||
Map<String, Object> output = new TreeMap<>();
|
||||
groupedByGroup.forEach(
|
||||
libraryInstrumentations.forEach(
|
||||
(group, entities) -> {
|
||||
Map<String, Object> groupMap = new LinkedHashMap<>();
|
||||
List<Map<String, Object>> instrumentations = new ArrayList<>();
|
||||
for (InstrumentationEntity entity : entities) {
|
||||
Map<String, Object> entityMap = baseProperties(entity);
|
||||
|
||||
Map<String, Object> targetVersions = new TreeMap<>();
|
||||
if (entity.getTargetVersions() != null && !entity.getTargetVersions().isEmpty()) {
|
||||
entity
|
||||
.getTargetVersions()
|
||||
.forEach(
|
||||
(type, versions) -> {
|
||||
if (!versions.isEmpty()) {
|
||||
targetVersions.put(type.toString(), new ArrayList<>(versions));
|
||||
}
|
||||
});
|
||||
}
|
||||
entityMap.put("target_versions", targetVersions);
|
||||
|
||||
instrumentations.add(entityMap);
|
||||
}
|
||||
output.put(group, instrumentations);
|
||||
});
|
||||
|
||||
Map<String, Object> newOutput = new TreeMap<>();
|
||||
if (output.isEmpty()) {
|
||||
return newOutput;
|
||||
}
|
||||
newOutput.put("libraries", output);
|
||||
return newOutput;
|
||||
}
|
||||
|
||||
private static Map<String, Object> generateBaseYaml(
|
||||
List<InstrumentationEntity> list, InstrumentationClassification classification) {
|
||||
List<InstrumentationEntity> filtered =
|
||||
list.stream()
|
||||
.filter(entity -> entity.getMetadata().getClassification().equals(classification))
|
||||
.toList();
|
||||
|
||||
List<Map<String, Object>> instrumentations = new ArrayList<>();
|
||||
for (InstrumentationEntity entity : filtered) {
|
||||
instrumentations.add(baseProperties(entity));
|
||||
}
|
||||
|
||||
Map<String, Object> newOutput = new TreeMap<>();
|
||||
if (instrumentations.isEmpty()) {
|
||||
return newOutput;
|
||||
}
|
||||
newOutput.put(classification.toString(), instrumentations);
|
||||
return newOutput;
|
||||
}
|
||||
|
||||
private static Map<String, Object> baseProperties(InstrumentationEntity entity) {
|
||||
Map<String, Object> entityMap = new LinkedHashMap<>();
|
||||
entityMap.put("name", entity.getInstrumentationName());
|
||||
|
||||
|
@ -65,39 +143,7 @@ public class YamlHelper {
|
|||
|
||||
Map<String, Object> scopeMap = getScopeMap(entity);
|
||||
entityMap.put("scope", scopeMap);
|
||||
|
||||
Map<String, Object> targetVersions = new TreeMap<>();
|
||||
if (entity.getTargetVersions() != null && !entity.getTargetVersions().isEmpty()) {
|
||||
entity
|
||||
.getTargetVersions()
|
||||
.forEach(
|
||||
(type, versions) -> {
|
||||
if (!versions.isEmpty()) {
|
||||
targetVersions.put(type.toString(), new ArrayList<>(versions));
|
||||
}
|
||||
});
|
||||
}
|
||||
entityMap.put("target_versions", targetVersions);
|
||||
|
||||
instrumentations.add(entityMap);
|
||||
}
|
||||
groupMap.put("instrumentations", instrumentations);
|
||||
output.put(group, groupMap);
|
||||
});
|
||||
|
||||
DumperOptions options = new DumperOptions();
|
||||
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||
|
||||
Yaml yaml = new Yaml(options);
|
||||
yaml.dump(output, writer);
|
||||
}
|
||||
|
||||
// We assume true unless explicitly overridden
|
||||
private static Boolean isLibraryInstrumentation(InstrumentationMetaData metadata) {
|
||||
if (metadata == null) {
|
||||
return true;
|
||||
}
|
||||
return metadata.getIsLibraryInstrumentation();
|
||||
return entityMap;
|
||||
}
|
||||
|
||||
private static Map<String, Object> getScopeMap(InstrumentationEntity entity) {
|
||||
|
|
|
@ -7,6 +7,7 @@ package io.opentelemetry.instrumentation.docs.utils;
|
|||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import io.opentelemetry.instrumentation.docs.internal.InstrumentationClassification;
|
||||
import io.opentelemetry.instrumentation.docs.internal.InstrumentationEntity;
|
||||
import io.opentelemetry.instrumentation.docs.internal.InstrumentationMetaData;
|
||||
import io.opentelemetry.instrumentation.docs.internal.InstrumentationType;
|
||||
|
@ -29,8 +30,11 @@ class YamlHelperTest {
|
|||
InstrumentationType.JAVAAGENT,
|
||||
new HashSet<>(List.of("org.springframework:spring-web:[6.0.0,)")));
|
||||
|
||||
InstrumentationMetaData metadata1 =
|
||||
new InstrumentationMetaData("Spring Web 6.0 instrumentation", true, true);
|
||||
InstrumentationMetaData springMetadata =
|
||||
new InstrumentationMetaData(
|
||||
"Spring Web 6.0 instrumentation",
|
||||
InstrumentationClassification.LIBRARY.toString(),
|
||||
true);
|
||||
|
||||
entities.add(
|
||||
new InstrumentationEntity.Builder()
|
||||
|
@ -39,7 +43,7 @@ class YamlHelperTest {
|
|||
.namespace("spring")
|
||||
.group("spring")
|
||||
.targetVersions(targetVersions1)
|
||||
.metadata(metadata1)
|
||||
.metadata(springMetadata)
|
||||
.minJavaVersion(11)
|
||||
.build());
|
||||
|
||||
|
@ -60,13 +64,13 @@ class YamlHelperTest {
|
|||
StringWriter stringWriter = new StringWriter();
|
||||
BufferedWriter writer = new BufferedWriter(stringWriter);
|
||||
|
||||
YamlHelper.printInstrumentationList(entities, writer);
|
||||
YamlHelper.generateInstrumentationYaml(entities, writer);
|
||||
writer.flush();
|
||||
|
||||
String expectedYaml =
|
||||
"""
|
||||
libraries:
|
||||
spring:
|
||||
instrumentations:
|
||||
- name: spring-web-6.0
|
||||
description: Spring Web 6.0 instrumentation
|
||||
disabled_by_default: true
|
||||
|
@ -78,7 +82,6 @@ class YamlHelperTest {
|
|||
javaagent:
|
||||
- org.springframework:spring-web:[6.0.0,)
|
||||
struts:
|
||||
instrumentations:
|
||||
- name: struts-2.3
|
||||
source_path: instrumentation/struts/struts-2.3
|
||||
scope:
|
||||
|
@ -92,15 +95,18 @@ class YamlHelperTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
void testPrintInstrumentationListIgnoresNonLibraryInstrumentation() throws Exception {
|
||||
void testGenerateInstrumentationYamlSeparatesClassifications() throws Exception {
|
||||
List<InstrumentationEntity> entities = new ArrayList<>();
|
||||
Map<InstrumentationType, Set<String>> targetVersions1 = new HashMap<>();
|
||||
targetVersions1.put(
|
||||
Map<InstrumentationType, Set<String>> springTargetVersions = new HashMap<>();
|
||||
springTargetVersions.put(
|
||||
InstrumentationType.JAVAAGENT,
|
||||
new HashSet<>(List.of("org.springframework:spring-web:[6.0.0,)")));
|
||||
|
||||
InstrumentationMetaData metadata1 =
|
||||
new InstrumentationMetaData("Spring Web 6.0 instrumentation");
|
||||
InstrumentationMetaData springMetadata =
|
||||
new InstrumentationMetaData(
|
||||
"Spring Web 6.0 instrumentation",
|
||||
InstrumentationClassification.LIBRARY.toString(),
|
||||
false);
|
||||
|
||||
entities.add(
|
||||
new InstrumentationEntity.Builder()
|
||||
|
@ -108,12 +114,13 @@ class YamlHelperTest {
|
|||
.instrumentationName("spring-web-6.0")
|
||||
.namespace("spring")
|
||||
.group("spring")
|
||||
.targetVersions(targetVersions1)
|
||||
.metadata(metadata1)
|
||||
.targetVersions(springTargetVersions)
|
||||
.metadata(springMetadata)
|
||||
.minJavaVersion(11)
|
||||
.build());
|
||||
|
||||
InstrumentationMetaData metadata2 = new InstrumentationMetaData(null, false, null);
|
||||
InstrumentationMetaData internalMetadata =
|
||||
new InstrumentationMetaData(null, InstrumentationClassification.INTERNAL.toString(), null);
|
||||
|
||||
entities.add(
|
||||
new InstrumentationEntity.Builder()
|
||||
|
@ -121,20 +128,33 @@ class YamlHelperTest {
|
|||
.instrumentationName("internal-application-logger")
|
||||
.namespace("internal")
|
||||
.group("internal")
|
||||
.metadata(metadata2)
|
||||
.metadata(internalMetadata)
|
||||
.targetVersions(new HashMap<>())
|
||||
.build());
|
||||
|
||||
InstrumentationMetaData customMetadata =
|
||||
new InstrumentationMetaData(null, InstrumentationClassification.CUSTOM.toString(), null);
|
||||
|
||||
entities.add(
|
||||
new InstrumentationEntity.Builder()
|
||||
.srcPath("instrumentation/opentelemetry-external-annotations-1.0")
|
||||
.instrumentationName("opentelemetry-external-annotations")
|
||||
.namespace("opentelemetry-external-annotations")
|
||||
.group("opentelemetry-external-annotations")
|
||||
.metadata(customMetadata)
|
||||
.targetVersions(new HashMap<>())
|
||||
.build());
|
||||
|
||||
StringWriter stringWriter = new StringWriter();
|
||||
BufferedWriter writer = new BufferedWriter(stringWriter);
|
||||
|
||||
YamlHelper.printInstrumentationList(entities, writer);
|
||||
YamlHelper.generateInstrumentationYaml(entities, writer);
|
||||
writer.flush();
|
||||
|
||||
String expectedYaml =
|
||||
"""
|
||||
libraries:
|
||||
spring:
|
||||
instrumentations:
|
||||
- name: spring-web-6.0
|
||||
description: Spring Web 6.0 instrumentation
|
||||
source_path: instrumentation/spring/spring-web/spring-web-6.0
|
||||
|
@ -144,6 +164,16 @@ class YamlHelperTest {
|
|||
target_versions:
|
||||
javaagent:
|
||||
- org.springframework:spring-web:[6.0.0,)
|
||||
internal:
|
||||
- name: internal-application-logger
|
||||
source_path: instrumentation/internal/internal-application-logger
|
||||
scope:
|
||||
name: io.opentelemetry.internal-application-logger
|
||||
custom:
|
||||
- name: opentelemetry-external-annotations
|
||||
source_path: instrumentation/opentelemetry-external-annotations-1.0
|
||||
scope:
|
||||
name: io.opentelemetry.opentelemetry-external-annotations
|
||||
""";
|
||||
|
||||
assertThat(expectedYaml).isEqualTo(stringWriter.toString());
|
||||
|
@ -154,21 +184,21 @@ class YamlHelperTest {
|
|||
String input =
|
||||
"""
|
||||
description: test description
|
||||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
disabled_by_default: true
|
||||
""";
|
||||
|
||||
InstrumentationMetaData metadata = YamlHelper.metaDataParser(input);
|
||||
assertThat(metadata.getIsLibraryInstrumentation()).isFalse();
|
||||
assertThat(metadata.getClassification()).isEqualTo(InstrumentationClassification.INTERNAL);
|
||||
assertThat(metadata.getDescription()).isEqualTo("test description");
|
||||
assertThat(metadata.getDisabledByDefault()).isEqualTo(true);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testMetadataParserWithOnlyLibraryEntry() {
|
||||
String input = "isLibraryInstrumentation: false";
|
||||
String input = "classification: internal";
|
||||
InstrumentationMetaData metadata = YamlHelper.metaDataParser(input);
|
||||
assertThat(metadata.getIsLibraryInstrumentation()).isFalse();
|
||||
assertThat(metadata.getClassification()).isEqualTo(InstrumentationClassification.INTERNAL);
|
||||
assertThat(metadata.getDescription()).isNull();
|
||||
assertThat(metadata.getDisabledByDefault()).isFalse();
|
||||
}
|
||||
|
@ -177,7 +207,7 @@ class YamlHelperTest {
|
|||
void testMetadataParserWithOnlyDescription() {
|
||||
String input = "description: false";
|
||||
InstrumentationMetaData metadata = YamlHelper.metaDataParser(input);
|
||||
assertThat(metadata.getIsLibraryInstrumentation()).isTrue();
|
||||
assertThat(metadata.getClassification()).isEqualTo(InstrumentationClassification.LIBRARY);
|
||||
assertThat(metadata.getDisabledByDefault()).isFalse();
|
||||
}
|
||||
|
||||
|
@ -185,7 +215,7 @@ class YamlHelperTest {
|
|||
void testMetadataParserWithOnlyDisabledByDefault() {
|
||||
String input = "disabled_by_default: true";
|
||||
InstrumentationMetaData metadata = YamlHelper.metaDataParser(input);
|
||||
assertThat(metadata.getIsLibraryInstrumentation()).isTrue();
|
||||
assertThat(metadata.getClassification()).isEqualTo(InstrumentationClassification.LIBRARY);
|
||||
assertThat(metadata.getDescription()).isNull();
|
||||
assertThat(metadata.getDisabledByDefault()).isTrue();
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: custom
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: custom
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: custom
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: custom
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: custom
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: custom
|
||||
|
|
|
@ -1 +1 @@
|
|||
isLibraryInstrumentation: false
|
||||
classification: internal
|
||||
|
|
Loading…
Reference in New Issue