mirror of https://github.com/databricks/cli.git
address comments
This commit is contained in:
parent
bbc2632474
commit
a7e54a22d5
|
@ -75,8 +75,8 @@ func New(ctx context.Context) *cobra.Command {
|
||||||
|
|
||||||
// Configure our user agent with the command that's about to be executed.
|
// Configure our user agent with the command that's about to be executed.
|
||||||
ctx = withCommandInUserAgent(ctx, cmd)
|
ctx = withCommandInUserAgent(ctx, cmd)
|
||||||
ctx = withUpstreamInUserAgent(ctx)
|
|
||||||
ctx = withCommandExecIdInUserAgent(ctx)
|
ctx = withCommandExecIdInUserAgent(ctx)
|
||||||
|
ctx = withUpstreamInUserAgent(ctx)
|
||||||
cmd.SetContext(ctx)
|
cmd.SetContext(ctx)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,9 +8,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func withCommandExecIdInUserAgent(ctx context.Context) context.Context {
|
func withCommandExecIdInUserAgent(ctx context.Context) context.Context {
|
||||||
// A UUID that'll will allow use to correlate multiple API requests made by
|
// A UUID that will allow us to correlate multiple API requests made by
|
||||||
// the same command invocation.
|
// the same CLI invocation.
|
||||||
// When we add telemetry to the CLI, this exec ID will allow allow us to
|
|
||||||
// correlate logs in HTTP access logs with logs in Frontend logs.
|
|
||||||
return useragent.InContext(ctx, "cmd-exec-id", uuid.New().String())
|
return useragent.InContext(ctx, "cmd-exec-id", uuid.New().String())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue