Merge pull request #1357 from influxdata/opentracing

opentracing
pull/10616/head
Jorge Landivar 2018-11-13 15:21:32 -06:00 committed by GitHub
commit e4dcb7fb58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"
"github.com/opentracing/opentracing-go"
"math"
"sync"
"sync/atomic"
@ -609,7 +610,11 @@ func (r *runner) clearRunning(id platform.ID) {
func (r *runner) executeAndWait(ctx context.Context, qr QueuedRun, runLogger *zap.Logger) {
defer r.wg.Done()
rp, err := r.executor.Execute(r.ctx, qr)
sp, spCtx := opentracing.StartSpanFromContext(ctx, "task.run.execution")
defer sp.Finish()
rp, err := r.executor.Execute(spCtx, qr)
if err != nil {
// TODO(mr): retry? and log error.