-
Notifications
You must be signed in to change notification settings - Fork 1k
Add ability to document configuration options in metadata.yaml #13742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9ee58fc
5b6f386
f2721a6
863558a
f5298a7
7c00144
00f1293
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -239,13 +239,21 @@ libraries: | |
| - org.apache.camel:camel-core:[2.19,3) | ||
| cassandra: | ||
| - name: cassandra-4.0 | ||
| description: | | ||
| Instruments the Cassandra database client, providing database client spans and metrics for Cassandra queries. | ||
| source_path: instrumentation/cassandra/cassandra-4.0 | ||
| scope: | ||
| name: io.opentelemetry.cassandra-4.0 | ||
| target_versions: | ||
| javaagent: | ||
| - com.datastax.oss:java-driver-core:[4.0,4.4) | ||
| configurations: | ||
| - name: otel.instrumentation.common.db-statement-sanitizer.enabled | ||
| description: Enables statement sanitization for database queries. | ||
| default: 'true' | ||
| - name: cassandra-4.4 | ||
| description: | | ||
| Instruments the Cassandra database client, providing database client spans and metrics for Cassandra queries. | ||
| source_path: instrumentation/cassandra/cassandra-4.4 | ||
| scope: | ||
| name: io.opentelemetry.cassandra-4.4 | ||
|
|
@@ -254,13 +262,23 @@ libraries: | |
| - com.datastax.oss:java-driver-core:[4.4,] | ||
| library: | ||
| - com.datastax.oss:java-driver-core:4.4.0 | ||
| configurations: | ||
| - name: otel.instrumentation.common.db-statement-sanitizer.enabled | ||
| description: Enables statement sanitization for database queries. | ||
| default: 'true' | ||
| - name: cassandra-3.0 | ||
| description: | | ||
| Instruments the Cassandra database client, providing database client spans and metrics for Cassandra queries. | ||
| source_path: instrumentation/cassandra/cassandra-3.0 | ||
| scope: | ||
| name: io.opentelemetry.cassandra-3.0 | ||
| target_versions: | ||
| javaagent: | ||
| - com.datastax.cassandra:cassandra-driver-core:[3.0,4.0) | ||
| configurations: | ||
| - name: otel.instrumentation.common.db-statement-sanitizer.enabled | ||
| description: Enables statement sanitization for database queries. | ||
| default: 'true' | ||
| clickhouse: | ||
| - name: clickhouse-client-0.5 | ||
| description: Instruments the V1 ClickHouseClient, providing database client spans | ||
|
|
@@ -271,6 +289,10 @@ libraries: | |
| target_versions: | ||
| javaagent: | ||
| - com.clickhouse.client:clickhouse-client:[0.5.0,) | ||
| configurations: | ||
| - name: otel.instrumentation.common.db-statement-sanitizer.enabled | ||
| description: Enables statement sanitization for database queries. | ||
| default: 'true' | ||
| couchbase: | ||
| - name: couchbase-3.1.6 | ||
| source_path: instrumentation/couchbase/couchbase-3.1.6 | ||
|
|
@@ -382,12 +404,21 @@ libraries: | |
| - org.elasticsearch:elasticsearch:[5.3.0,6.0.0) | ||
| executors: | ||
| - name: executors | ||
| description: | | ||
| The executor instrumentation ensures that context is automatically propagated when using common Java executors (e.g., ThreadPoolExecutor, ScheduledThreadPoolExecutor, ForkJoinPool). When a task is submitted, the current context is captured and bound to the task. Then, when the task eventually runs, even if it’s on a different thread, the instrumentation reactivates that context, enabling consistent correlation across concurrent and asynchronous workflows. | ||
| source_path: instrumentation/executors | ||
| scope: | ||
| name: io.opentelemetry.executors | ||
| target_versions: | ||
| javaagent: | ||
| - Java 8+ | ||
| configurations: | ||
| - name: otel.instrumentation.executors.include | ||
| description: List of Executor subclasses to be instrumented. | ||
| default: '' | ||
| - name: otel.instrumentation.executors.include-all | ||
| description: Whether to instrument all classes that implement the Executor interface. | ||
| default: 'false' | ||
| finagle: | ||
| - name: finagle-http-23.11 | ||
| source_path: instrumentation/finagle-http-23.11 | ||
|
|
@@ -708,13 +739,27 @@ libraries: | |
| - org.jboss.logmanager:jboss-logmanager:[1.1.0.GA,) | ||
| jdbc: | ||
| - name: jdbc | ||
| description: | | ||
| The JDBC instrumentation provides database client spans and metrics. Each call produces a span named after the SQL verb, enriched with standard DB client attributes (system, database, operation, sanitized statement, peer address) and error details if an exception occurs. | ||
| disabled_by_default: true | ||
| source_path: instrumentation/jdbc | ||
| scope: | ||
| name: io.opentelemetry.jdbc | ||
| target_versions: | ||
| javaagent: | ||
| - Java 8+ | ||
| configurations: | ||
| - name: otel.instrumentation.jdbc.statement-sanitizer.enabled | ||
| description: Enables statement sanitization for database queries. Takes precedent | ||
| to otel.instrumentation.common.db-statement-sanitizer.enabled. | ||
| default: 'true' | ||
| - name: otel.instrumentation.common.db-statement-sanitizer.enabled | ||
| description: Enables statement sanitization for database queries. | ||
| default: 'true' | ||
| - name: otel.instrumentation.common.peer-service-mapping | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not related to this PR but I guess the peer service handling is a bit inconsistent. I think we are using it only for some of the instrumentations.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you think it's worth an effort to standardize the approach?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should strive for consistent behavior across instrumentations, but it is one of the many nice to have things. |
||
| description: Used to specify a mapping from host names or IP addresses to peer | ||
| services. | ||
| default: '' | ||
| jedis: | ||
| - name: jedis-1.4 | ||
| source_path: instrumentation/jedis/jedis-1.4 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| /* | ||
| * Copyright The OpenTelemetry Authors | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| package io.opentelemetry.instrumentation.docs.internal; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
|
||
| /** | ||
| * This class is internal and is hence not for public use. Its APIs are unstable and can change at | ||
| * any time. | ||
| */ | ||
| public record ConfigurationOption( | ||
| String name, String description, @JsonProperty("default") String defaultValue) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trask should we have a framework specific flags for this in all frameworks? I think it was added for a few.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, I almost wish we didn't have the "common" variant, to make it harder for users to do the wrong thing (send sensitive data unexpectedly from some other db instrumentation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be worth me opening an issue to replace the
commonconfig flags, or at the very least start with this one? I plan on working through module to module to document the various configs, so I can track the common ones I find and replace the usages with framework specific ones as I go, if that's a direction we want to move in.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, I only dislike this one common flag due to it broadly disabling sensitive data sanitization, the other common flags I like
I'm not sure I dislike it enough though to cause upgrade pain by removing it