Mark capture-query-parameters as experimental (#13850)
Co-authored-by: Lauri Tulmin <ltulmin@splunk.com>
This commit is contained in:
parent
01a1afeb44
commit
6f80481a2e
|
|
@ -1,7 +1,7 @@
|
|||
# Settings for the JDBC instrumentation
|
||||
|
||||
| System property | Type | Default | Description |
|
||||
|--------------------------------------------------------------|---------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `otel.instrumentation.jdbc.statement-sanitizer.enabled` | Boolean | `true` | Enables the DB statement sanitization. |
|
||||
| `otel.instrumentation.jdbc.capture-query-parameters` | Boolean | `false` | Enable the capture of query parameters as span attributes. Enabling this option disables the statement sanitization. <p>WARNING: captured query parameters may contain sensitive information such as passwords, personally identifiable information or protected health info. |
|
||||
| `otel.instrumentation.jdbc.experimental.transaction.enabled` | Boolean | `false` | Enables experimental instrumentation to create spans for COMMIT and ROLLBACK operations. |
|
||||
| System property | Type | Default | Description |
|
||||
|-------------------------------------------------------------------|---------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `otel.instrumentation.jdbc.statement-sanitizer.enabled` | Boolean | `true` | Enables the DB statement sanitization. |
|
||||
| `otel.instrumentation.jdbc.experimental.capture-query-parameters` | Boolean | `false` | Enable the capture of query parameters as span attributes. Enabling this option disables the statement sanitization. <p>WARNING: captured query parameters may contain sensitive information such as passwords, personally identifiable information or protected health info. |
|
||||
| `otel.instrumentation.jdbc.experimental.transaction.enabled` | Boolean | `false` | Enables experimental instrumentation to create spans for COMMIT and ROLLBACK operations. |
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ tasks {
|
|||
filter {
|
||||
includeTestsMatching("PreparedStatementParametersTest")
|
||||
}
|
||||
jvmArgs("-Dotel.instrumentation.jdbc.capture-query-parameters=true")
|
||||
jvmArgs("-Dotel.instrumentation.jdbc.experimental.capture-query-parameters=true")
|
||||
}
|
||||
|
||||
check {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class JdbcSingletons {
|
|||
|
||||
CAPTURE_QUERY_PARAMETERS =
|
||||
AgentInstrumentationConfig.get()
|
||||
.getBoolean("otel.instrumentation.jdbc.capture-query-parameters", false);
|
||||
.getBoolean("otel.instrumentation.jdbc.experimental.capture-query-parameters", false);
|
||||
|
||||
STATEMENT_INSTRUMENTER =
|
||||
JdbcInstrumenterFactory.createStatementInstrumenter(
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public final class JdbcInstrumenterFactory {
|
|||
|
||||
public static boolean captureQueryParameters() {
|
||||
return ConfigPropertiesUtil.getBoolean(
|
||||
"otel.instrumentation.jdbc.capture-query-parameters", false);
|
||||
"otel.instrumentation.jdbc.experimental.capture-query-parameters", false);
|
||||
}
|
||||
|
||||
public static Instrumenter<DbRequest, Void> createStatementInstrumenter(
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ configurations:
|
|||
description: Used to specify a mapping from host names or IP addresses to peer services.
|
||||
type: map
|
||||
default: ""
|
||||
- name: otel.instrumentation.jdbc.capture-query-parameters
|
||||
- name: otel.instrumentation.jdbc.experimental.capture-query-parameters
|
||||
description: >
|
||||
Sets whether the query parameters should be captured as span attributes named
|
||||
<code>db.query.parameter.<key></code>. Enabling this option disables the statement
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ final class DataSourcePostProcessor implements BeanPostProcessor, Ordered {
|
|||
.setCaptureQueryParameters(
|
||||
configPropertiesProvider
|
||||
.getObject()
|
||||
.getBoolean("otel.instrumentation.jdbc.capture-query-parameters", false))
|
||||
.getBoolean(
|
||||
"otel.instrumentation.jdbc.experimental.capture-query-parameters", false))
|
||||
.setTransactionInstrumenterEnabled(
|
||||
configPropertiesProvider
|
||||
.getObject()
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@
|
|||
"defaultValue": true
|
||||
},
|
||||
{
|
||||
"name": "otel.instrumentation.jdbc.capture-query-parameters",
|
||||
"name": "otel.instrumentation.jdbc.experimental.capture-query-parameters",
|
||||
"type": "java.lang.Boolean",
|
||||
"description": "Sets whether the query parameters should be captured as span attributes named <code>db.query.parameter.<key></code>. Enabling this option disables the statement sanitization.<p>WARNING: captured query parameters may contain sensitive information such as passwords, personally identifiable information or protected health info.",
|
||||
"defaultValue": false
|
||||
|
|
|
|||
Loading…
Reference in New Issue