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

Function RecordOperationDuration

internal/otel/metrics.go:218–220  ·  view source on GitHub ↗

RecordOperationDuration records the total operation duration. dbIndex is the Redis database index (0-15).

(ctx context.Context, duration time.Duration, cmd Cmder, attempts int, err error, cn *pool.Conn, dbIndex int)

Source from the content-addressed store, hash-verified

216// RecordOperationDuration records the total operation duration.
217// dbIndex is the Redis database index (0-15).
218func RecordOperationDuration(ctx context.Context, duration time.Duration, cmd Cmder, attempts int, err error, cn *pool.Conn, dbIndex int) {
219 getRecorder().RecordOperationDuration(ctx, duration, cmd, attempts, err, cn, dbIndex)
220}
221
222// RecordPipelineOperationDuration records the total pipeline/transaction duration.
223// This is called from redis.go after pipeline/transaction execution completes.

Callers

nothing calls this directly

Calls 2

getRecorderFunction · 0.85

Tested by

no test coverage detected