We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e8ad794 commit 7acc0cdCopy full SHA for 7acc0cd
extra/redisotel/metrics.go
@@ -193,11 +193,13 @@ func (mh *metricsHook) DialHook(hook redis.DialHook) redis.DialHook {
193
194
conn, err := hook(ctx, network, addr)
195
196
+ dur := time.Since(start)
197
+
198
attrs := make([]attribute.KeyValue, 0, len(mh.attrs)+1)
199
attrs = append(attrs, mh.attrs...)
200
attrs = append(attrs, statusAttr(err))
201
- mh.createTime.Record(ctx, milliseconds(time.Since(start)), metric.WithAttributes(attrs...))
202
+ mh.createTime.Record(ctx, milliseconds(dur), metric.WithAttributes(attrs...))
203
return conn, err
204
}
205
0 commit comments