MCPcopy
hub / github.com/redis/go-redis / metricsRecorder

Struct metricsRecorder

extra/redisotel-native/metrics.go:41–60  ·  view source on GitHub ↗

metricsRecorder implements the otel.Recorder interface

Source from the content-addressed store, hash-verified

39
40// metricsRecorder implements the otel.Recorder interface
41type metricsRecorder struct {
42 operationDuration metric.Float64Histogram
43 connectionCount metric.Int64UpDownCounter // OTel semconv: UpDownCounter for connection.count
44 connectionCreateTime metric.Float64Histogram
45 connectionRelaxedTimeout metric.Int64UpDownCounter
46 connectionHandoff metric.Int64Counter
47 clientErrors metric.Int64Counter
48 maintenanceNotifications metric.Int64Counter
49
50 connectionWaitTime metric.Float64Histogram
51 connectionClosed metric.Int64Counter
52 connectionPendingReqs metric.Int64UpDownCounter // OTel semconv: UpDownCounter for pending_requests
53
54 pubsubMessages metric.Int64Counter
55
56 streamLag metric.Float64Histogram
57
58 // Configuration
59 cfg *config
60}
61
62// RecordOperationDuration records db.client.operation.duration metric
63func (r *metricsRecorder) RecordOperationDuration(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected