Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
486 changes: 486 additions & 0 deletions docs/instrumentation-list.yaml

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions instrumentation-docs/instrumentations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,15 @@ readonly INSTRUMENTATIONS=(
"jaxws:jaxws-cxf-3.0:javaagent:test"
"jaxws:jaxws-jws-api-1.1:javaagent:test"
"jaxws:jaxws-metro-2.2:javaagent:test"
"jedis:jedis-1.4:javaagent:test"
"jedis:jedis-1.4:javaagent:testStableSemconv"
"jedis:jedis-3.0:javaagent:test"
"jedis:jedis-3.0:javaagent:testStableSemconv"
"jedis:jedis-4.0:javaagent:test"
"jedis:jedis-4.0:javaagent:testStableSemconv"
"jetty:jetty-8.0:javaagent:test"
"jetty:jetty-11.0:javaagent:test"
"jetty:jetty-12.0:javaagent:test"
"jetty-httpclient:jetty-httpclient-12.0:javaagent:test"
"jetty-httpclient:jetty-httpclient-9.2:javaagent:test"
"jodd-http-4.2:javaagent:test"
Expand Down
2 changes: 2 additions & 0 deletions instrumentation/jedis/jedis-1.4/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ testing {
tasks {
withType<Test>().configureEach {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
}

val testStableSemconv by registering(Test::class) {
testClassesDirs = sourceSets.test.get().output.classesDirs
classpath = sourceSets.test.get().runtimeClasspath

jvmArgs("-Dotel.semconv-stability.opt-in=database")
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
}

check {
Expand Down
14 changes: 14 additions & 0 deletions instrumentation/jedis/jedis-1.4/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: This instrumentation enables database client spans and database client metrics for Jedis Redis operations.
semantic_conventions:
- DATABASE_CLIENT_SPANS
- DATABASE_CLIENT_METRICS
library_link: https://github.com/redis/jedis
configurations:
- name: otel.instrumentation.common.db-statement-sanitizer.enabled
description: Enables statement sanitization for database queries.
type: boolean
default: true
- name: otel.instrumentation.common.peer-service-mapping
description: Used to specify a mapping from host names or IP addresses to peer services.
type: map
default: ""
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@

package io.opentelemetry.javaagent.instrumentation.jedis;

import static io.opentelemetry.instrumentation.testing.junit.db.DbClientMetricsTestUtil.assertDurationMetric;
import static io.opentelemetry.instrumentation.testing.junit.db.SemconvStabilityUtil.maybeStable;
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;
import static io.opentelemetry.semconv.ServerAttributes.SERVER_ADDRESS;
import static io.opentelemetry.semconv.ServerAttributes.SERVER_PORT;
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_OPERATION;
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_OPERATION_NAME;
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_STATEMENT;
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_SYSTEM;
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_SYSTEM_NAME;
import static io.opentelemetry.semconv.incubating.PeerIncubatingAttributes.PEER_SERVICE;
import static org.assertj.core.api.Assertions.assertThat;

Expand Down Expand Up @@ -76,6 +79,14 @@ void setCommand() {
equalTo(PEER_SERVICE, "test-peer-service"),
equalTo(SERVER_ADDRESS, host),
equalTo(SERVER_PORT, port))));

assertDurationMetric(
testing,
"io.opentelemetry.jedis-1.4",
DB_SYSTEM_NAME,
DB_OPERATION_NAME,
SERVER_ADDRESS,
SERVER_PORT);
}

@Test
Expand Down
2 changes: 2 additions & 0 deletions instrumentation/jedis/jedis-3.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ dependencies {
tasks {
withType<Test>().configureEach {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
}

val testStableSemconv by registering(Test::class) {
testClassesDirs = sourceSets.test.get().output.classesDirs
classpath = sourceSets.test.get().runtimeClasspath

jvmArgs("-Dotel.semconv-stability.opt-in=database")
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
}

check {
Expand Down
14 changes: 14 additions & 0 deletions instrumentation/jedis/jedis-3.0/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
description: This instrumentation enables database client spans and database client metrics for Jedis Redis operations.
semantic_conventions:
- DATABASE_CLIENT_SPANS
- DATABASE_CLIENT_METRICS
library_link: https://github.com/redis/jedis
configurations:
- name: otel.instrumentation.common.db-statement-sanitizer.enabled
description: Enables statement sanitization for database queries.
type: boolean
default: true
- name: otel.instrumentation.common.peer-service-mapping
description: Used to specify a mapping from host names or IP addresses to peer services.
type: map
default: ""
2 changes: 2 additions & 0 deletions instrumentation/jedis/jedis-4.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ tasks {
// latest dep test fails because peer ip is 0:0:0:0:0:0:0:1 instead of 127.0.0.1
jvmArgs("-Djava.net.preferIPv4Stack=true")
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
}

val testStableSemconv by registering(Test::class) {
testClassesDirs = sourceSets.test.get().output.classesDirs
classpath = sourceSets.test.get().runtimeClasspath

jvmArgs("-Dotel.semconv-stability.opt-in=database")
systemProperty("metadataConfig", "otel.semconv-stability.opt-in=database")
}

check {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@

package io.opentelemetry.javaagent.instrumentation.jedis.v4_0;

import static io.opentelemetry.instrumentation.testing.junit.db.DbClientMetricsTestUtil.assertDurationMetric;
import static io.opentelemetry.instrumentation.testing.junit.db.SemconvStabilityUtil.maybeStable;
import static io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions.equalTo;
import static io.opentelemetry.semconv.NetworkAttributes.NETWORK_PEER_ADDRESS;
import static io.opentelemetry.semconv.NetworkAttributes.NETWORK_PEER_PORT;
import static io.opentelemetry.semconv.NetworkAttributes.NETWORK_TYPE;
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_OPERATION;
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_OPERATION_NAME;
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_STATEMENT;
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_SYSTEM;
import static io.opentelemetry.semconv.incubating.DbIncubatingAttributes.DB_SYSTEM_NAME;
import static org.assertj.core.api.Assertions.assertThat;

import io.opentelemetry.api.trace.SpanKind;
Expand Down Expand Up @@ -79,6 +82,14 @@ void setCommand() {
equalTo(NETWORK_TYPE, "ipv4"),
equalTo(NETWORK_PEER_PORT, port),
equalTo(NETWORK_PEER_ADDRESS, ip))));

assertDurationMetric(
testing,
"io.opentelemetry.jedis-4.0",
DB_SYSTEM_NAME,
DB_OPERATION_NAME,
NETWORK_PEER_ADDRESS,
NETWORK_PEER_PORT);
}

@Test
Expand Down
10 changes: 10 additions & 0 deletions instrumentation/jedis/jedis-4.0/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: This instrumentation enables database client spans and database client metrics for Jedis Redis operations.
semantic_conventions:
- DATABASE_CLIENT_SPANS
- DATABASE_CLIENT_METRICS
library_link: https://github.com/redis/jedis
configurations:
- name: otel.instrumentation.common.db-statement-sanitizer.enabled
description: Enables statement sanitization for database queries.
type: boolean
default: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
description: This instrumentation enables HTTP client spans and HTTP client metrics for Jetty HTTP Client.
semantic_conventions:
- HTTP_CLIENT_SPANS
- HTTP_CLIENT_METRICS
library_link: https://eclipse.dev/jetty/
configurations:
- name: otel.instrumentation.http.known-methods
description: >
Configures the instrumentation to recognize an alternative set of HTTP request methods. All
other methods will be treated as `_OTHER`.
type: list
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
- name: otel.instrumentation.http.client.capture-request-headers
description: List of HTTP request headers to capture in HTTP client telemetry.
type: list
default: ""
- name: otel.instrumentation.http.client.capture-response-headers
description: List of HTTP response headers to capture in HTTP client telemetry.
type: list
default: ""
- name: otel.instrumentation.common.peer-service-mapping
description: Used to specify a mapping from host names or IP addresses to peer services.
type: map
default: ""
- name: otel.instrumentation.http.client.emit-experimental-telemetry
description: >
Enable the capture of experimental HTTP client telemetry. Adds the `http.request.body.size`
and `http.response.body.size` attributes to spans, and records `http.client.request.size` and
`http.client.response.size` metrics.
type: boolean
default: false
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
type: boolean
default: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
description: This instrumentation enables HTTP client spans and HTTP client metrics for Jetty HTTP Client.
semantic_conventions:
- HTTP_CLIENT_SPANS
- HTTP_CLIENT_METRICS
library_link: https://eclipse.dev/jetty/
configurations:
- name: otel.instrumentation.http.known-methods
description: >
Configures the instrumentation to recognize an alternative set of HTTP request methods. All
other methods will be treated as `_OTHER`.
type: list
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
- name: otel.instrumentation.http.client.capture-request-headers
description: List of HTTP request headers to capture in HTTP client telemetry.
type: list
default: ""
- name: otel.instrumentation.http.client.capture-response-headers
description: List of HTTP response headers to capture in HTTP client telemetry.
type: list
default: ""
- name: otel.instrumentation.common.peer-service-mapping
description: Used to specify a mapping from host names or IP addresses to peer services.
type: map
default: ""
- name: otel.instrumentation.http.client.emit-experimental-telemetry
description: >
Enable the capture of experimental HTTP client telemetry. Adds the `http.request.body.size`
and `http.response.body.size` attributes to spans, and records `http.client.request.size` and
`http.client.response.size` metrics.
type: boolean
default: false
- name: otel.instrumentation.http.client.experimental.redact-query-parameters
description: Redact sensitive URL parameters. See https://opentelemetry.io/docs/specs/semconv/http/http-spans.
type: boolean
default: true
4 changes: 4 additions & 0 deletions instrumentation/jetty/jetty-11.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ dependencies {
otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_11)
}

tasks.test {
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
}
27 changes: 27 additions & 0 deletions instrumentation/jetty/jetty-11.0/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
description: This instrumentation enables HTTP server spans and HTTP server metrics for Jetty.
semantic_conventions:
- HTTP_SERVER_SPANS
- HTTP_SERVER_METRICS
library_link: https://eclipse.dev/jetty/
configurations:
- name: otel.instrumentation.http.known-methods
description: >
Configures the instrumentation to recognize an alternative set of HTTP request methods. All
other methods will be treated as `_OTHER`.
type: list
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
- name: otel.instrumentation.http.server.capture-request-headers
description: List of HTTP request headers to capture in HTTP server telemetry.
type: list
default: ""
- name: otel.instrumentation.http.server.capture-response-headers
description: List of HTTP response headers to capture in HTTP server telemetry.
type: list
default: ""
- name: otel.instrumentation.http.server.emit-experimental-telemetry
description: >
Enable the capture of experimental HTTP server telemetry. Adds the `http.request.body.size`
and `http.response.body.size` attributes to spans, and records `http.server.request.size` and
`http.server.response.size` metrics.
type: boolean
default: false
4 changes: 4 additions & 0 deletions instrumentation/jetty/jetty-12.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ dependencies {
otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_17)
}

tasks.test {
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
}
27 changes: 27 additions & 0 deletions instrumentation/jetty/jetty-12.0/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
description: This instrumentation enables HTTP server spans and HTTP server metrics for Jetty.
semantic_conventions:
- HTTP_SERVER_SPANS
- HTTP_SERVER_METRICS
library_link: https://eclipse.dev/jetty/
configurations:
- name: otel.instrumentation.http.known-methods
description: >
Configures the instrumentation to recognize an alternative set of HTTP request methods. All
other methods will be treated as `_OTHER`.
type: list
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
- name: otel.instrumentation.http.server.capture-request-headers
description: List of HTTP request headers to capture in HTTP server telemetry.
type: list
default: ""
- name: otel.instrumentation.http.server.capture-response-headers
description: List of HTTP response headers to capture in HTTP server telemetry.
type: list
default: ""
- name: otel.instrumentation.http.server.emit-experimental-telemetry
description: >
Enable the capture of experimental HTTP server telemetry. Adds the `http.request.body.size`
and `http.response.body.size` attributes to spans, and records `http.server.request.size` and
`http.server.response.size` metrics.
type: boolean
default: false
4 changes: 4 additions & 0 deletions instrumentation/jetty/jetty-8.0/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ if (latestDepTest) {
minJavaVersionSupported.set(JavaVersion.VERSION_11)
}
}

tasks.test {
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
}
29 changes: 29 additions & 0 deletions instrumentation/jetty/jetty-8.0/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
description: This instrumentation enables HTTP server spans and HTTP server metrics for Jetty.
semantic_conventions:
- HTTP_SERVER_SPANS
- HTTP_SERVER_METRICS
features:
- CONTEXT_PROPAGATION
library_link: https://eclipse.dev/jetty/
configurations:
- name: otel.instrumentation.http.known-methods
description: >
Configures the instrumentation to recognize an alternative set of HTTP request methods. All
other methods will be treated as `_OTHER`.
type: list
default: "CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,TRACE"
- name: otel.instrumentation.http.server.capture-request-headers
description: List of HTTP request headers to capture in HTTP server telemetry.
type: list
default: ""
- name: otel.instrumentation.http.server.capture-response-headers
description: List of HTTP response headers to capture in HTTP server telemetry.
type: list
default: ""
- name: otel.instrumentation.http.server.emit-experimental-telemetry
description: >
Enable the capture of experimental HTTP server telemetry. Adds the `http.request.body.size`
and `http.response.body.size` attributes to spans, and records `http.server.request.size` and
`http.server.response.size` metrics.
type: boolean
default: false
Loading