reduce timeout of the Otel tracing command

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
Guillaume Lours 2024-02-21 14:21:43 +01:00 committed by Nicolas De loof
parent f937e42aaf
commit 4f97edf355
2 changed files with 2 additions and 2 deletions

View File

@ -104,7 +104,7 @@ func wrapRunE(c *cobra.Command, cmdSpan trace.Span, tracingShutdown tracing.Shut
if tracingShutdown != nil { if tracingShutdown != nil {
// use background for root context because the cmd's context might have // use background for root context because the cmd's context might have
// been canceled already // been canceled already
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
defer cancel() defer cancel()
// TODO(milas): add an env var to enable logging from the // TODO(milas): add an env var to enable logging from the
// OTel components for debugging purposes // OTel components for debugging purposes

View File

@ -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() defer cancel()
conn, err := grpc.DialContext( conn, err := grpc.DialContext(
dialCtx, dialCtx,