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
83 changes: 76 additions & 7 deletions docs/instrumentation-list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2097,13 +2097,13 @@ libraries:
- name: server.port
type: LONG
clickhouse:
- name: clickhouse-client-0.5
description: Instruments the V1 ClickHouseClient, providing database client spans
and metrics.
- name: clickhouse-client-v1-0.5
description: This instrumentation enables database client spans and metrics for
the V1 ClickHouse client.
library_link: https://github.com/ClickHouse/clickhouse-java
source_path: instrumentation/clickhouse-client-0.5
source_path: instrumentation/clickhouse/clickhouse-client-v1-0.5
scope:
name: io.opentelemetry.clickhouse-client-0.5
name: io.opentelemetry.clickhouse-client-v1-0.5
target_versions:
javaagent:
- com.clickhouse.client:clickhouse-client:[0.5.0,)
Expand Down Expand Up @@ -2165,6 +2165,74 @@ libraries:
type: STRING
- name: server.port
type: LONG
- name: clickhouse-client-v2-0.8
description: This instrumentation enables database client spans and metrics for
the V2 ClickHouse client.
library_link: https://github.com/ClickHouse/clickhouse-java
source_path: instrumentation/clickhouse/clickhouse-client-v2-0.8
scope:
name: io.opentelemetry.clickhouse-client-v2-0.8
target_versions:
javaagent:
- com.clickhouse:client-v2:[0.6.4,)
configurations:
- name: otel.instrumentation.common.db-statement-sanitizer.enabled
description: Enables statement sanitization for database queries.
type: boolean
default: true
telemetry:
- when: default
spans:
- span_kind: CLIENT
attributes:
- name: db.name
type: STRING
- name: db.operation
type: STRING
- name: db.statement
type: STRING
- name: db.system
type: STRING
- name: server.address
type: STRING
- name: server.port
type: LONG
- 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: server.address
type: STRING
- name: server.port
type: LONG
spans:
- span_kind: CLIENT
attributes:
- name: db.namespace
type: STRING
- name: db.operation.name
type: STRING
- name: db.query.text
type: STRING
- name: db.response.status_code
type: STRING
- name: db.system.name
type: STRING
- name: error.type
type: STRING
- name: server.address
type: STRING
- name: server.port
type: LONG
couchbase:
- name: couchbase-2.0
description: |
Expand Down Expand Up @@ -4072,8 +4140,8 @@ libraries:
type: STRING
javalin:
- name: javalin-5.0
description: This instrumentation enriches existing HTTP server spans with route information,
it does not emit any telemetry on its own.
description: This instrumentation enriches existing HTTP server spans with route
information, it does not emit any telemetry on its own.
source_path: instrumentation/javalin-5.0
minimum_java_version: 11
scope:
Expand Down Expand Up @@ -6550,6 +6618,7 @@ libraries:
description: This instrumentation enriches HTTP server spans and metrics with
route information.
source_path: instrumentation/spring/spring-web/spring-web-6.0
minimum_java_version: 17
scope:
name: io.opentelemetry.spring-web-6.0
target_versions:
Expand Down
6 changes: 4 additions & 2 deletions instrumentation-docs/instrumentations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ readonly INSTRUMENTATIONS=(
"apache-dubbo-2.7:javaagent:testDubbo"
"c3p0-0.9:javaagent:test"
"c3p0-0.9:javaagent:testStableSemconv"
"clickhouse-client-0.5:javaagent:test"
"clickhouse-client-0.5:javaagent:testStableSemconv"
"clickhouse:clickhouse-client-v1-0.5:javaagent:test"
"clickhouse:clickhouse-client-v1-0.5:javaagent:testStableSemconv"
"clickhouse:clickhouse-client-v2-0.8:javaagent:test"
"clickhouse:clickhouse-client-v2-0.8:javaagent:testStableSemconv"
"aws-sdk:aws-sdk-1.11:javaagent:test"
"google-http-client-1.19:javaagent:test"
"http-url-connection:javaagent:test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
description: Instruments the V1 ClickHouseClient, providing database client spans and metrics.
description: This instrumentation enables database client spans and metrics for the V1 ClickHouse client.
library_link: https://github.com/ClickHouse/clickhouse-java
configurations:
- name: otel.instrumentation.common.db-statement-sanitizer.enabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@ dependencies {
library("com.clickhouse:client-v2:0.8.0")
}

val collectMetadata = findProperty("collectMetadata")?.toString() ?: "false"

tasks {
test {
withType<Test>().configureEach {
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
systemProperty("collectMetadata", collectMetadata)
systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
}

val testStableSemconv by registering(Test::class) {
jvmArgs("-Dotel.semconv-stability.opt-in=database")
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")
systemProperty("collectMetadata", collectMetadata)
}

check {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void testConnectionStringWithoutDatabaseSpecifiedStillGeneratesSpans() throws Ex

assertDurationMetric(
testing,
"io.opentelemetry.clickhouse-clientv2-0.8",
"io.opentelemetry.clickhouse-client-v2-0.8",
DB_SYSTEM_NAME,
DB_OPERATION_NAME,
DB_NAMESPACE,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
description: This instrumentation enables database client spans and metrics for the V2 ClickHouse client.
library_link: https://github.com/ClickHouse/clickhouse-java
configurations:
- name: otel.instrumentation.common.db-statement-sanitizer.enabled
description: Enables statement sanitization for database queries.
type: boolean
default: true