MCPcopy
hub / github.com/claude-code-best/claude-code / shouldIncludeAttribute

Function shouldIncludeAttribute

src/utils/telemetryAttributes.ts:16–27  ·  view source on GitHub ↗
(
  envVar: keyof typeof METRICS_CARDINALITY_DEFAULTS,
)

Source from the content-addressed store, hash-verified

14}
15
16function shouldIncludeAttribute(
17 envVar: keyof typeof METRICS_CARDINALITY_DEFAULTS,
18): boolean {
19 const defaultValue = METRICS_CARDINALITY_DEFAULTS[envVar]
20 const envValue = process.env[envVar]
21
22 if (envValue === undefined) {
23 return defaultValue
24 }
25
26 return isEnvTruthy(envValue)
27}
28
29export function getTelemetryAttributes(): Attributes {
30 const userId = getOrCreateUserID()

Callers 1

getTelemetryAttributesFunction · 0.85

Calls 1

isEnvTruthyFunction · 0.70

Tested by

no test coverage detected