We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f70c952 commit 7c4b924Copy full SHA for 7c4b924
extra/redisotel/metrics.go
@@ -193,7 +193,11 @@ func (mh *metricsHook) DialHook(hook redis.DialHook) redis.DialHook {
193
194
conn, err := hook(ctx, network, addr)
195
196
- mh.createTime.Record(ctx, milliseconds(time.Since(start)), mh.attrs...)
+ attrs := make([]attribute.KeyValue, 0, len(mh.attrs)+1)
197
+ attrs = append(attrs, mh.attrs...)
198
+ attrs = append(attrs, statusAttr(err))
199
+
200
+ mh.createTime.Record(ctx, milliseconds(time.Since(start)), attrs...)
201
return conn, err
202
}
203
0 commit comments