observability

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MeterProvider

func MeterProvider() *metric.MeterProvider

Types

type ChannelLogger

type ChannelLogger struct {
	// contains filtered or unexported fields
}

func NewChannelLogger

func NewChannelLogger(channelID string, logCfg *config.ChannelLogging, globalLevel string) *ChannelLogger

func NewChannelLoggerWithWriter

func NewChannelLoggerWithWriter(channelID string, logCfg *config.ChannelLogging, globalLevel string, w io.Writer) *ChannelLogger

func (*ChannelLogger) LogFilteredMessage

func (cl *ChannelLogger) LogFilteredMessage(messageID string)

func (*ChannelLogger) LogResponsePayload

func (cl *ChannelLogger) LogResponsePayload(destination string, data []byte)

func (*ChannelLogger) LogSentPayload

func (cl *ChannelLogger) LogSentPayload(destination string, data []byte)

func (*ChannelLogger) LogSourcePayload

func (cl *ChannelLogger) LogSourcePayload(raw []byte)

func (*ChannelLogger) LogTransformedPayload

func (cl *ChannelLogger) LogTransformedPayload(data []byte)

func (*ChannelLogger) Logger

func (cl *ChannelLogger) Logger() *slog.Logger

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

func Global

func Global() *Metrics

func NewMetrics

func NewMetrics() *Metrics

func (*Metrics) Counter

func (m *Metrics) Counter(name string) *atomic.Int64

func (*Metrics) Gauge

func (m *Metrics) Gauge(name string) *atomic.Int64

func (*Metrics) IncrErrored

func (m *Metrics) IncrErrored(channel, destination string)

func (*Metrics) IncrFiltered

func (m *Metrics) IncrFiltered(channel string)

func (*Metrics) IncrProcessed

func (m *Metrics) IncrProcessed(channel string)

func (*Metrics) IncrReceived

func (m *Metrics) IncrReceived(channel string)

func (*Metrics) RecordDestLatency

func (m *Metrics) RecordDestLatency(channel, destination string, d time.Duration)

func (*Metrics) RecordLatency

func (m *Metrics) RecordLatency(channel, stage string, d time.Duration)

func (*Metrics) Snapshot

func (m *Metrics) Snapshot() map[string]any

func (*Metrics) Timing

func (m *Metrics) Timing(name string) *TimingStat

type OTelMetrics

type OTelMetrics struct {
	// contains filtered or unexported fields
}

func GetOTelMetrics

func GetOTelMetrics() *OTelMetrics

func (*OTelMetrics) IncrErrored

func (om *OTelMetrics) IncrErrored(channel, destination string)

func (*OTelMetrics) IncrFiltered

func (om *OTelMetrics) IncrFiltered(channel string)

func (*OTelMetrics) IncrProcessed

func (om *OTelMetrics) IncrProcessed(channel string)

func (*OTelMetrics) IncrReceived

func (om *OTelMetrics) IncrReceived(channel string)

func (*OTelMetrics) RecordDestLatency

func (om *OTelMetrics) RecordDestLatency(channel, destination string, d time.Duration)

func (*OTelMetrics) RecordLatency

func (om *OTelMetrics) RecordLatency(channel, stage string, d time.Duration)

func (*OTelMetrics) SetQueueDepth

func (om *OTelMetrics) SetQueueDepth(channel, destination string, depth int64)

type OTelShutdown

type OTelShutdown struct {
	// contains filtered or unexported fields
}

func InitOTel

func InitOTel(cfg *config.OTelConfig) (*OTelShutdown, error)

func (*OTelShutdown) Shutdown

func (s *OTelShutdown) Shutdown(ctx context.Context) error

type PrometheusServer

type PrometheusServer struct {
	// contains filtered or unexported fields
}

func NewPrometheusServer

func NewPrometheusServer(cfg *config.PrometheusConfig, logger *slog.Logger) (*PrometheusServer, error)

func (*PrometheusServer) Start

func (ps *PrometheusServer) Start() error

func (*PrometheusServer) Stop

func (ps *PrometheusServer) Stop() error

type TimingStat

type TimingStat struct {
	// contains filtered or unexported fields
}

func (*TimingStat) Record

func (ts *TimingStat) Record(d time.Duration)

func (*TimingStat) Stats

func (ts *TimingStat) Stats() (count int64, avg, min, max time.Duration)

Jump to

Keyboard shortcuts

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