metricsRecorder implements the otel.Recorder interface
| 39 | |
| 40 | // metricsRecorder implements the otel.Recorder interface |
| 41 | type 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 |
| 63 | func (r *metricsRecorder) RecordOperationDuration( |
nothing calls this directly
no outgoing calls
no test coverage detected