( envVar: keyof typeof METRICS_CARDINALITY_DEFAULTS, )
| 24 | } |
| 25 | |
| 26 | function 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 | |
| 39 | type TelemetryIdentitySession = |
| 40 | | Pick<ResolvedAuthSession, 'providerPlan' | 'headersKind' | 'scopes' | 'identity'> |
no test coverage detected