move context.WithTimings before root span creation
@@ -183,11 +183,11 @@ func (p *Processor) Terminate() {
}
func (p *Processor) process(ctx gocontext.Context, buildJob Job) {
+ ctx = context.WithTimings(ctx)
+
ctx, span := trace.StartSpan(ctx, "ProcessorRun")
defer span.End()
- ctx = context.WithTimings(ctx)
-
span.AddAttributes(
trace.StringAttribute("app", "worker"),
trace.Int64Attribute("job_id", int64(buildJob.Payload().Job.ID)),
