TracingConfig

data class TracingConfig(val traceConnectionOperations: Boolean = false, val traceChannelManagementOperations: Boolean = false, val captureMessageBody: Boolean = false, val maxBodySizeToCapture: Int = 1024, val publishSpanNameFormatter: (exchange: String, routingKey: String) -> String = defaultPublishSpanNameFormatter, val consumeSpanNameFormatter: (queue: String) -> String = defaultConsumeSpanNameFormatter)

Configuration options for OpenTelemetry tracing behavior.

Constructors

Link copied to clipboard
constructor(traceConnectionOperations: Boolean = false, traceChannelManagementOperations: Boolean = false, captureMessageBody: Boolean = false, maxBodySizeToCapture: Int = 1024, publishSpanNameFormatter: (exchange: String, routingKey: String) -> String = defaultPublishSpanNameFormatter, consumeSpanNameFormatter: (queue: String) -> String = defaultConsumeSpanNameFormatter)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Whether to capture message bodies as span attributes. Warning: May expose sensitive data. Default: false.

Link copied to clipboard

Custom span name formatter for consume operations. Default: "{queue} receive".

Link copied to clipboard

Maximum size of message body to capture (if enabled). Default: 1024 bytes.

Link copied to clipboard
val publishSpanNameFormatter: (exchange: String, routingKey: String) -> String

Custom span name formatter for publish operations. Default: "{exchange} send" or "{routingKey} send" if exchange is empty.

Link copied to clipboard

Whether to create spans for channel management operations (queueDeclare, exchangeDeclare, bindings, QoS, etc.). Default: false (to reduce noise).

Link copied to clipboard

Whether to create spans for connection operations (open, close, heartbeat). Default: false (to reduce noise).