Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HeaderCarrier ¶
type HeaderCarrier []kgo.RecordHeader
HeaderCarrier adapts kafka headers to the TextMapCarrier interface for propagation.
func (HeaderCarrier) Get ¶
func (hc HeaderCarrier) Get(key string) string
func (HeaderCarrier) Keys ¶
func (hc HeaderCarrier) Keys() []string
func (HeaderCarrier) Set ¶
func (hc HeaderCarrier) Set(key, value string)
type Instrumentor ¶
type Instrumentor struct {
MessagesProcessedCounter metric.Int64Counter
ProcessingTimeHistogram metric.Float64Histogram
}
Instrumentor holds the OpenTelemetry instruments and provides methods for common instrumentation.
func NewInstrumentor ¶
func NewInstrumentor() (*Instrumentor, error)
NewInstrumentor creates and initializes the OpenTelemetry instruments.
func (*Instrumentor) InstrumentMessage ¶
func (i *Instrumentor) InstrumentMessage(ctx context.Context, record *kgo.Record, success bool, startTime time.Time)
InstrumentMessage instruments a message processing operation with metrics and trace attributes.
Click to show internal directories.
Click to hide internal directories.