Tracing: Standardize on otel tracing (#75528)

This commit is contained in:
Marcus Efraimsson
2023-10-03 14:54:20 +02:00
committed by GitHub
parent 4432c4c75c
commit e4c1a7a141
46 changed files with 321 additions and 439 deletions
+2 -2
View File
@@ -70,7 +70,7 @@ func (gm *MathCommand) NeedsVars() []string {
// failed to execute.
func (gm *MathCommand) Execute(ctx context.Context, _ time.Time, vars mathexp.Vars, tracer tracing.Tracer) (mathexp.Results, error) {
_, span := tracer.Start(ctx, "SSE.ExecuteMath")
span.SetAttributes("expression", gm.RawExpression, attribute.Key("expression").String(gm.RawExpression))
span.SetAttributes(attribute.String("expression", gm.RawExpression))
defer span.End()
return gm.Expression.Execute(gm.refID, vars, tracer)
}
@@ -163,7 +163,7 @@ func (gr *ReduceCommand) Execute(ctx context.Context, _ time.Time, vars mathexp.
_, span := tracer.Start(ctx, "SSE.ExecuteReduce")
defer span.End()
span.SetAttributes("reducer", gr.Reducer, attribute.Key("reducer").String(gr.Reducer))
span.SetAttributes(attribute.String("reducer", gr.Reducer))
newRes := mathexp.Results{}
for i, val := range vars[gr.VarToReduce].Values {