Download src/services/analytics/firstPartyEventLogger.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 1.23 kB
-
https://huggingface.co/chenbhao/codev/resolve/e91c8197c9918ff9e5df3140e8c36282bb30e9a2/src/services/analytics/firstPartyEventLogger.ts
- Command line
-
hf download hf://chenbhao/codev@e91c8197c9918ff9e5df3140e8c36282bb30e9a2/src/services/analytics/firstPartyEventLogger.ts
-
curl -L -o firstPartyEventLogger.ts https://huggingface.co/chenbhao/codev/resolve/e91c8197c9918ff9e5df3140e8c36282bb30e9a2/src/services/analytics/firstPartyEventLogger.ts
1.23 kB
| /** | |
| * First-party event logging is intentionally disabled in the OSS build. | |
| * | |
| * This file preserves the public API used throughout the CLI while ensuring no | |
| * telemetry providers, exporters, or batching logic are initialized. | |
| */ | |
| import type { GrowthBookUserAttributes } from './growthbook.js' | |
| export type EventSamplingConfig = { | |
| [eventName: string]: { | |
| sample_rate: number | |
| } | |
| } | |
| export function getEventSamplingConfig(): EventSamplingConfig { | |
| return {} | |
| } | |
| export function shouldSampleEvent(_eventName: string): number | null { | |
| return 0 | |
| } | |
| export async function shutdown1PEventLogging(): Promise<void> {} | |
| export function is1PEventLoggingEnabled(): boolean { | |
| return false | |
| } | |
| export function logEventTo1P( | |
| _eventName: string, | |
| _metadata: Record<string, number | boolean | undefined> = {}, | |
| ): void {} | |
| export type GrowthBookExperimentData = { | |
| experimentId: string | |
| variationId: number | |
| userAttributes?: GrowthBookUserAttributes | |
| experimentMetadata?: Record<string, unknown> | |
| } | |
| export function logGrowthBookExperimentTo1P( | |
| _data: GrowthBookExperimentData, | |
| ): void {} | |
| export function initialize1PEventLogging(): void {} | |
| export async function reinitialize1PEventLoggingIfConfigChanged(): Promise<void> {} | |