MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isBetaTracingEnabled

Function isBetaTracingEnabled

src/utils/telemetry/betaSessionTracing.ts:78–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76 * allowlisted via the tengu_trace_lantern GrowthBook gate
77 */
78export 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.

Callers 14

executeHooksFunction · 0.85
initializeTelemetryFunction · 0.85
isAnyTracingEnabledFunction · 0.85
startHookSpanFunction · 0.85
endHookSpanFunction · 0.85

Calls 3

isEnvTruthyFunction · 0.85

Tested by

no test coverage detected