From 821627b08bd9704f95ebfcbf94e67dbc4a8d8ed4 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Wed, 30 Oct 2024 15:31:13 +0100 Subject: [PATCH] - --- cmd/root/user_agent_command.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmd/root/user_agent_command.go b/cmd/root/user_agent_command.go index baed6ab90..574f6bb34 100644 --- a/cmd/root/user_agent_command.go +++ b/cmd/root/user_agent_command.go @@ -34,9 +34,11 @@ func commandString(cmd *cobra.Command) string { } func withCommandInUserAgent(ctx context.Context, cmd *cobra.Command) context.Context { - // We add a uuid to the command context to trace multiple API requests made - // by the same command invocation. - newCtx := useragent.InContext(ctx, "cmd-trace-id", uuid.New().String()) + // A UUID that'll will allow use to correlate multiple API requests made by + // the same command invocation. + // When we add telemetry to the CLI, this trace ID will allow allow us to + // correlate logs in HTTP access logs with logs in Frontend logs. + newCtx := useragent.InContext(ctx, "command-trace-id", uuid.New().String()) return useragent.InContext(newCtx, "cmd", commandString(cmd)) }