diff options
author | Nick Thomas <nick@gitlab.com> | 2021-04-30 13:18:49 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2021-04-30 13:18:49 +0100 |
commit | 669234ec198530c23d67fb126a0ed7e82e04d6bc (patch) | |
tree | 0c3d106cfa90478bd793a1728e7e8d2db8008821 | |
parent | 584643e0e10e0cbeee4f8366b5e50656dfee9ea4 (diff) | |
download | gitlab-shell-dont-close-span-early.tar.gz |
Don't finish the opentracing span earlydont-close-span-early
Calling finished() in `ContextWithCorrelationID` breaks opentracing,
since it expects us to call it just before exiting, and this defer
runs on function completion.
All existing users of ContextWithCorrelationID already `defer finish()`
themselves, so this call is entirely surplus to requirements.
-rw-r--r-- | internal/command/command.go | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/internal/command/command.go b/internal/command/command.go index bb430b7..97b24ba 100644 --- a/internal/command/command.go +++ b/internal/command/command.go @@ -53,7 +53,6 @@ func New(e *executable.Executable, arguments []string, env sshenv.Env, config *c // generated. func ContextWithCorrelationID() (context.Context, func()) { ctx, finished := tracing.ExtractFromEnv(context.Background()) - defer finished() correlationID := correlation.ExtractFromContext(ctx) if correlationID == "" { |