Skip to content

Commit bfba654

Browse files
committed
Update ordering
1 parent 103a07a commit bfba654

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extra/redisotel/metrics.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ func (mh *metricsHook) ProcessHook(hook redis.ProcessHook) redis.ProcessHook {
215215
dur := time.Since(start)
216216

217217
attrs := make([]attribute.KeyValue, 0, len(mh.attrs)+2)
218-
attrs = append(attrs, mh.attrs...)
219218
attrs = append(attrs, mh.attrsFunc(ctx)...)
219+
attrs = append(attrs, mh.attrs...)
220220
attrs = append(attrs, attribute.String("type", "command"))
221221
attrs = append(attrs, statusAttr(err))
222222

@@ -237,8 +237,8 @@ func (mh *metricsHook) ProcessPipelineHook(
237237
dur := time.Since(start)
238238

239239
attrs := make([]attribute.KeyValue, 0, len(mh.attrs)+2)
240-
attrs = append(attrs, mh.attrs...)
241240
attrs = append(attrs, mh.attrsFunc(ctx)...)
241+
attrs = append(attrs, mh.attrs...)
242242
attrs = append(attrs, attribute.String("type", "pipeline"))
243243
attrs = append(attrs, statusAttr(err))
244244

0 commit comments

Comments
 (0)