telemetry

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Tracer

func Tracer() trace.Tracer

Tracer returns a new tracer from the global tracer provider.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL