MCPcopy Create free account
hub / github.com/Noumena-Network/code / shouldIncludeAttribute

Function shouldIncludeAttribute

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

Source from the content-addressed store, hash-verified

24 }
25
26function shouldIncludeAttribute(
27 envVar: keyof typeof METRICS_CARDINALITY_DEFAULTS,
28): boolean {
29 const defaultValue = METRICS_CARDINALITY_DEFAULTS[envVar]
30 const envValue = process.env[envVar]
31
32 if (envValue === undefined) {
33 return defaultValue
34 }
35
36 return isEnvTruthy(envValue)
37}
38
39type TelemetryIdentitySession =
40 | Pick<ResolvedAuthSession, 'providerPlan' | 'headersKind' | 'scopes' | 'identity'>

Callers 2

getTelemetryAttributesFunction · 0.85

Calls 1

isEnvTruthyFunction · 0.90

Tested by

no test coverage detected