From 7b8b3a603de9de3b641d758096f5dbe4023dcfd7 Mon Sep 17 00:00:00 2001 From: Kyle Kincer Date: Sat, 13 Jul 2024 19:29:15 -0400 Subject: [PATCH] feat: add command name to metrics --- extra/redisotel/metrics.go | 1 + 1 file changed, 1 insertion(+) diff --git a/extra/redisotel/metrics.go b/extra/redisotel/metrics.go index 915838f3..4bdc33f5 100644 --- a/extra/redisotel/metrics.go +++ b/extra/redisotel/metrics.go @@ -216,6 +216,7 @@ func (mh *metricsHook) ProcessHook(hook redis.ProcessHook) redis.ProcessHook { attrs = append(attrs, mh.attrs...) attrs = append(attrs, attribute.String("type", "command")) attrs = append(attrs, statusAttr(err)) + attrs = append(attrs, attribute.String("cmd", cmd.FullName())) mh.useTime.Record(ctx, milliseconds(dur), metric.WithAttributes(attrs...))