MCPcopy
hub / github.com/docker/docker-agent / getUserUUID

Function getUserUUID

pkg/telemetry/utils.go:47–49  ·  view source on GitHub ↗

getUserUUID returns the persistent UUID identifying this cagent installation, generating and persisting one on first use. It delegates to [userid.Get], which is also used by the HTTP transport so the same identifier appears as the `user_uuid` telemetry property and as the `X-Cagent-Id` header on ga

()

Source from the content-addressed store, hash-verified

45// telemetry property and as the `X-Cagent-Id` header on gateway-bound
46// requests.
47func getUserUUID() string {
48 return userid.Get()
49}
50
51// structToMap converts a struct to map[string]any using JSON marshaling
52// This automatically handles all fields and respects JSON tags (including omitempty)

Callers 1

newClientFunction · 0.85

Calls 1

GetFunction · 0.92

Tested by

no test coverage detected