databricks-cli/cmd/root/user_agent_command_exec_id.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
379 B
Go
Raw Permalink Normal View History

package root
import (
"context"
"github.com/databricks/cli/libs/command"
"github.com/databricks/databricks-sdk-go/useragent"
)
func withCommandExecIdInUserAgent(ctx context.Context) context.Context {
// A UUID that will allow us to correlate multiple API requests made by
// the same CLI invocation.
return useragent.InContext(ctx, "cmd-exec-id", command.ExecId(ctx))
}