()
| 76 | * allowlisted via the tengu_trace_lantern GrowthBook gate |
| 77 | */ |
| 78 | export function isBetaTracingEnabled(): boolean { |
| 79 | const baseEnabled = |
| 80 | isEnvTruthy(process.env.ENABLE_BETA_TRACING_DETAILED) && |
| 81 | Boolean(process.env.BETA_TRACING_ENDPOINT) |
| 82 | |
| 83 | if (!baseEnabled) { |
| 84 | return false |
| 85 | } |
| 86 | |
| 87 | // For external users, enable in SDK/headless mode OR when org is allowlisted. |
| 88 | // Gate reads from disk cache, so first run after allowlisting returns false; |
| 89 | // works from second run onward (same behavior as enhanced_telemetry_beta). |
| 90 | if (process.env.USER_TYPE !== 'ant') { |
| 91 | return ( |
| 92 | getIsNonInteractiveSession() || |
| 93 | getFeatureValue_CACHED_MAY_BE_STALE('tengu_trace_lantern', false) |
| 94 | ) |
| 95 | } |
| 96 | |
| 97 | return true |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * Truncate content to fit within Honeycomb limits. |
no test coverage detected