mirror of https://github.com/databricks/cli.git
21 lines
437 B
Go
21 lines
437 B
Go
package root
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/databricks/databricks-sdk-go/useragent"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
var cmdExecId = uuid.New().String()
|
|
|
|
func CmdExecId() string {
|
|
return cmdExecId
|
|
}
|
|
|
|
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", cmdExecId)
|
|
}
|