From 32e5308453879e002f48f2c0434f8d70f052a0e2 Mon Sep 17 00:00:00 2001 From: Guillaume Lours <705411+glours@users.noreply.github.com> Date: Wed, 21 Feb 2024 14:21:43 +0100 Subject: [PATCH] reduce timeout of the Otel tracing command Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com> --- cmd/cmdtrace/cmd_span.go | 2 +- internal/tracing/docker_context.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/cmdtrace/cmd_span.go b/cmd/cmdtrace/cmd_span.go index 3a69ff93bce..9c1e66d230a 100644 --- a/cmd/cmdtrace/cmd_span.go +++ b/cmd/cmdtrace/cmd_span.go @@ -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) defer cancel() // TODO(milas): add an env var to enable logging from the // OTel components for debugging purposes diff --git a/internal/tracing/docker_context.go b/internal/tracing/docker_context.go index 229e77477d8..8f8e263797f 100644 --- a/internal/tracing/docker_context.go +++ b/internal/tracing/docker_context.go @@ -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) defer cancel() conn, err := grpc.DialContext( dialCtx,