MCPcopy Create free account
hub / github.com/algolia/cli / telemetryEnv

Function telemetryEnv

pkg/telemetry/telemetry.go:104–109  ·  view source on GitHub ↗

telemetryEnv reports which environment the events belong to: "prod" for release builds (goreleaser injects a semver version), "dev" for source builds (the version stays "main").

()

Source from the content-addressed store, hash-verified

102// release builds (goreleaser injects a semver version), "dev" for source
103// builds (the version stays "main").
104func telemetryEnv() string {
105 if version.Version == "main" {
106 return "dev"
107 }
108 return "prod"
109}
110
111// anonymousID is a unique identifier for an anonymous user of the CLI (basically the hash of the mac address)
112func anonymousID() string {

Callers 2

TestTelemetryEnvFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestTelemetryEnvFunction · 0.68