Wiring new context with initial span

This commit is contained in:
Denis Makogon
2017-09-06 21:55:52 +03:00
parent 9a89366d1b
commit 57a577dfc9
2 changed files with 5 additions and 4 deletions

View File

@@ -223,7 +223,8 @@ func (a *agent) Submit(callI Call) error {
a.stats.Complete()
// TODO if the context is timed out here we need to allocate new one
call.End(context.Background(), err)
ctx = opentracing.ContextWithSpan(context.Background(), span)
call.End(ctx, err)
return err
}