Skip to content

Commit

Permalink
reduce timeout of the Otel tracing command
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
  • Loading branch information
glours committed Mar 15, 2024
1 parent b2d4c1b commit 32e5308
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/cmdtrace/cmd_span.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func wrapRunE(c *cobra.Command, cmdSpan trace.Span, tracingShutdown tracing.Shut
if tracingShutdown != nil {
// use background for root context because the cmd's context might have
// been canceled already
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)

Check warning on line 107 in cmd/cmdtrace/cmd_span.go

View check run for this annotation

Codecov / codecov/patch

cmd/cmdtrace/cmd_span.go#L107

Added line #L107 was not covered by tests
defer cancel()
// TODO(milas): add an env var to enable logging from the
// OTel components for debugging purposes
Expand Down
2 changes: 1 addition & 1 deletion internal/tracing/docker_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func traceClientFromDockerContext(dockerCli command.Cli, otelEnv envMap) (otlptr
}
}

dialCtx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
dialCtx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)

Check warning on line 66 in internal/tracing/docker_context.go

View check run for this annotation

Codecov / codecov/patch

internal/tracing/docker_context.go#L66

Added line #L66 was not covered by tests
defer cancel()
conn, err := grpc.DialContext(
dialCtx,
Expand Down

0 comments on commit 32e5308

Please sign in to comment.