@@ -275,7 +275,7 @@ func (mh *metricsHook) DialHook(hook redis.DialHook) redis.DialHook {
275275 attrs = append (attrs , mh .attrs ... )
276276 attrs = append (attrs , statusAttr (err ))
277277
278- mh .createTime .Record (ctx , milliseconds (dur ), metric .WithAttributes ( attrs ... ))
278+ mh .createTime .Record (ctx , milliseconds (dur ), metric .WithAttributeSet ( attribute . NewSet ( attrs ... ) ))
279279 return conn , err
280280 }
281281}
@@ -293,7 +293,7 @@ func (mh *metricsHook) ProcessHook(hook redis.ProcessHook) redis.ProcessHook {
293293 attrs = append (attrs , attribute .String ("type" , "command" ))
294294 attrs = append (attrs , statusAttr (err ))
295295
296- mh .useTime .Record (ctx , milliseconds (dur ), metric .WithAttributes ( attrs ... ))
296+ mh .useTime .Record (ctx , milliseconds (dur ), metric .WithAttributeSet ( attribute . NewSet ( attrs ... ) ))
297297
298298 return err
299299 }
@@ -314,7 +314,7 @@ func (mh *metricsHook) ProcessPipelineHook(
314314 attrs = append (attrs , attribute .String ("type" , "pipeline" ))
315315 attrs = append (attrs , statusAttr (err ))
316316
317- mh .useTime .Record (ctx , milliseconds (dur ), metric .WithAttributes ( attrs ... ))
317+ mh .useTime .Record (ctx , milliseconds (dur ), metric .WithAttributeSet ( attribute . NewSet ( attrs ... ) ))
318318
319319 return err
320320 }
0 commit comments