Class MongoTelemetryBuilder
java.lang.Object
io.opentelemetry.instrumentation.mongo.v3_1.MongoTelemetryBuilder
A builder of
MongoTelemetry.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a newMongoTelemetrywith the settings of thisMongoTelemetryBuilder.setMaxNormalizedQueryLength(int maxNormalizedQueryLength) Sets the max length of recorded queries after normalization.setStatementSanitizationEnabled(boolean statementSanitizationEnabled) Sets whether thedb.statementattribute on the spans emitted by the constructedMongoTelemetryshould be sanitized.
-
Method Details
-
setStatementSanitizationEnabled
@CanIgnoreReturnValue public MongoTelemetryBuilder setStatementSanitizationEnabled(boolean statementSanitizationEnabled) Sets whether thedb.statementattribute on the spans emitted by the constructedMongoTelemetryshould be sanitized. If set totrue, all parameters that can potentially contain sensitive information will be masked. Enabled by default. -
setMaxNormalizedQueryLength
@CanIgnoreReturnValue public MongoTelemetryBuilder setMaxNormalizedQueryLength(int maxNormalizedQueryLength) Sets the max length of recorded queries after normalization. Defaults to 32768. -
build
Returns a newMongoTelemetrywith the settings of thisMongoTelemetryBuilder.
-