Class SqlClientAttributesExtractorBuilder<REQUEST,RESPONSE>
java.lang.Object
io.opentelemetry.instrumentation.api.incubator.semconv.db.SqlClientAttributesExtractorBuilder<REQUEST,RESPONSE>
A builder of
SqlClientAttributesExtractor.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a newSqlClientAttributesExtractorwith the settings of thisSqlClientAttributesExtractorBuilder.setStatementSanitizationEnabled(boolean statementSanitizationEnabled) Sets whether thedb.statementattribute extracted by the constructedSqlClientAttributesExtractorshould be sanitized.setTableAttribute(io.opentelemetry.api.common.AttributeKey<String> dbTableAttribute) Configures the extractor to set the table value extracted by theSqlClientAttributesExtractorunder thedbTableAttributekey.
-
Method Details
-
setTableAttribute
@CanIgnoreReturnValue public SqlClientAttributesExtractorBuilder<REQUEST,RESPONSE> setTableAttribute(io.opentelemetry.api.common.AttributeKey<String> dbTableAttribute) Configures the extractor to set the table value extracted by theSqlClientAttributesExtractorunder thedbTableAttributekey. By default, thedb.sql.tableattribute is used.- Parameters:
dbTableAttribute- TheAttributeKeyunder which the table extracted by theSqlClientAttributesExtractorwill be stored.
-
setStatementSanitizationEnabled
@CanIgnoreReturnValue public SqlClientAttributesExtractorBuilder<REQUEST,RESPONSE> setStatementSanitizationEnabled(boolean statementSanitizationEnabled) Sets whether thedb.statementattribute extracted by the constructedSqlClientAttributesExtractorshould be sanitized. If set totrue, all parameters that can potentially contain sensitive information will be masked. Enabled by default. -
build
public io.opentelemetry.instrumentation.api.instrumenter.AttributesExtractor<REQUEST,RESPONSE> build()Returns a newSqlClientAttributesExtractorwith the settings of thisSqlClientAttributesExtractorBuilder.
-