MCPcopy
hub / github.com/redis/go-redis / statusAttr

Function statusAttr

extra/redisotel/metrics.go:344–352  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

342}
343
344func statusAttr(err error) attribute.KeyValue {
345 if err != nil {
346 if err == redis.Nil {
347 return attribute.String("status", "nil")
348 }
349 return attribute.String("status", "error")
350 }
351 return attribute.String("status", "ok")
352}
353
354func errorTypeAttribute(err error) attribute.KeyValue {
355 switch {

Callers 3

DialHookMethod · 0.85
ProcessHookMethod · 0.85
ProcessPipelineHookMethod · 0.85

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected