Skip to content

Commit 7b8b3a6

Browse files
committed
feat: add command name to metrics
1 parent 67824eb commit 7b8b3a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

extra/redisotel/metrics.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ func (mh *metricsHook) ProcessHook(hook redis.ProcessHook) redis.ProcessHook {
216216
attrs = append(attrs, mh.attrs...)
217217
attrs = append(attrs, attribute.String("type", "command"))
218218
attrs = append(attrs, statusAttr(err))
219+
attrs = append(attrs, attribute.String("cmd", cmd.FullName()))
219220

220221
mh.useTime.Record(ctx, milliseconds(dur), metric.WithAttributes(attrs...))
221222

0 commit comments

Comments
 (0)