Skip to content

Commit

Permalink
JDBC-specific sanitizer property (#6472)
Browse files Browse the repository at this point in the history
  • Loading branch information
trask authored Aug 17, 2022
1 parent 4605be3 commit 9564dbb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import io.opentelemetry.instrumentation.api.instrumenter.db.DbClientSpanNameExtractor;
import io.opentelemetry.instrumentation.api.instrumenter.db.SqlClientAttributesExtractor;
import io.opentelemetry.instrumentation.api.instrumenter.net.NetClientAttributesExtractor;
import io.opentelemetry.instrumentation.api.internal.ConfigPropertiesUtil;
import io.opentelemetry.instrumentation.jdbc.internal.DbRequest;
import io.opentelemetry.instrumentation.jdbc.internal.JdbcAttributesGetter;
import io.opentelemetry.instrumentation.jdbc.internal.JdbcNetAttributesGetter;
Expand All @@ -34,7 +35,9 @@ public final class JdbcSingletons {
.addAttributesExtractor(
SqlClientAttributesExtractor.builder(dbAttributesGetter)
.setStatementSanitizationEnabled(
CommonConfig.get().isStatementSanitizationEnabled())
ConfigPropertiesUtil.getBoolean(
"otel.instrumentation.jdbc.statement-sanitizer.enabled",
CommonConfig.get().isStatementSanitizationEnabled()))
.build())
.addAttributesExtractor(NetClientAttributesExtractor.create(netAttributesGetter))
.addAttributesExtractor(
Expand Down

0 comments on commit 9564dbb

Please sign in to comment.