Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
A Consumer wraps a kafka.Consumer.
func NewConsumer ¶
NewConsumer calls kafka.NewConsumer and wraps the resulting Consumer.
func WrapConsumer ¶
WrapConsumer wraps a kafka.Consumer so that any consumed events are traced.
func (*Consumer) Close ¶
Close calls the underlying Consumer.Close and if polling is enabled, finishes any remaining span.
type MessageCarrier ¶
type MessageCarrier struct {
// contains filtered or unexported fields
}
A MessageCarrier injects and extracts traces from a kafka.Message.
func NewMessageCarrier ¶
func NewMessageCarrier(msg *kafka.Message) MessageCarrier
NewMessageCarrier creates a new MessageCarrier.
func (MessageCarrier) Get ¶
func (c MessageCarrier) Get(key string) string
Get retrieves a single value for a given key.
func (MessageCarrier) Keys ¶
func (c MessageCarrier) Keys() []string
type Producer ¶
type Producer struct { ConfluentProducer *kafka.Producer // contains filtered or unexported fields }
Producer wraps a kafka.Producer.
func WrapProducer ¶
WrapProducer wraps a kafka.Producer so requests are traced.
func (*Producer) Close ¶
func (p *Producer) Close()
Close closes internal produce channel. Use case: - User is writing to otel producer ProduceChannel() - User stops writing to otel producer ProduceChannel() - Now Close() can be safely called
func (*Producer) ProduceChannel ¶
ProduceChannel returns a channel which can receive kafka Messages and will send them to the underlying producer channel.
func (*Producer) WaitTeardown ¶
func (p *Producer) WaitTeardown()
WaitTeardown ensures that otel producer stopped writing to underlying confluent kafka produce channel.