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

Function shouldTrackDatadog

src/services/analytics/sink.ts:29–43  ·  view source on GitHub ↗

* Check if Datadog tracking is enabled. * Falls back to cached value from previous session if not yet initialized.

()

Source from the content-addressed store, hash-verified

27 * Falls back to cached value from previous session if not yet initialized.
28 */
29function shouldTrackDatadog(): boolean {
30 if (isSinkKilled('datadog')) {
31 return false
32 }
33 if (isDatadogGateEnabled !== undefined) {
34 return isDatadogGateEnabled
35 }
36
37 // Fallback to cached value from previous session
38 try {
39 return checkStatsigFeatureGate_CACHED_MAY_BE_STALE(DATADOG_GATE_NAME)
40 } catch {
41 return false
42 }
43}
44
45/**
46 * Log an event (synchronous implementation)

Callers 1

logEventImplFunction · 0.85

Calls 2

isSinkKilledFunction · 0.85

Tested by

no test coverage detected