TracingTopicProducer
class TracingTopicProducer(val delegate: TopicProducer, openTelemetry: OpenTelemetry, messagingSystem: String = OtelObserver.MEMORY_SYSTEM) : TopicProducer, AutoCloseable
A TopicProducer that sends through delegate in a span of its own, send <topic> of kind PRODUCER, the child of the span the sender runs in: a Kafka produce, its messaging.system messagingSystem. The span ends with its wow.outcome, and error.type after a failure. The messages themselves carry the sender's trace already (me.ahoo.wow.spi.log.Transport.trace), so their consumers continue the sender's trace, beside this span.
Closing it closes delegate when that is AutoCloseable, as a host that replaced its producer bean by this one closes the bean.
Constructors
Link copied to clipboard
constructor(delegate: TopicProducer, openTelemetry: OpenTelemetry, messagingSystem: String = OtelObserver.MEMORY_SYSTEM)