File size: 1,230 Bytes
064bfd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | /**
* 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> {}
|