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.setQuerySanitizationEnabled(boolean querySanitizationEnabled) Sets whether thedb.statement/db.query.textattribute on the spans emitted by the constructedMongoTelemetryshould be sanitized.
-
Method Details
-
setQuerySanitizationEnabled
@CanIgnoreReturnValue public MongoTelemetryBuilder setQuerySanitizationEnabled(boolean querySanitizationEnabled) Sets whether thedb.statement/db.query.textattribute 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.
-