* Check if Datadog tracking is enabled. * Falls back to cached value from previous session if not yet initialized.
()
| 27 | * Falls back to cached value from previous session if not yet initialized. |
| 28 | */ |
| 29 | function 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) |
no test coverage detected