summaryrefslogtreecommitdiff
path: root/internal/command/command.go
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2021-04-30 13:18:49 +0100
committerNick Thomas <nick@gitlab.com>2021-04-30 13:18:49 +0100
commit669234ec198530c23d67fb126a0ed7e82e04d6bc (patch)
tree0c3d106cfa90478bd793a1728e7e8d2db8008821 /internal/command/command.go
parent584643e0e10e0cbeee4f8366b5e50656dfee9ea4 (diff)
downloadgitlab-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.
Diffstat (limited to 'internal/command/command.go')
-rw-r--r--internal/command/command.go1
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 == "" {