Skip to content

Commit 168f918

Browse files
committed
Merge remote-tracking branch 'upstream/master' into add-metrics
2 parents a6ebc87 + e2153f5 commit 168f918

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

extra/redisotel/metrics.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,9 @@ func milliseconds(d time.Duration) float64 {
330330

331331
func statusAttr(err error) attribute.KeyValue {
332332
if err != nil {
333+
if err == redis.Nil {
334+
return attribute.String("status", "nil")
335+
}
333336
return attribute.String("status", "error")
334337
}
335338
return attribute.String("status", "ok")

0 commit comments

Comments
 (0)