ThreadplaneTelemetryConfig
Opt-in configuration for explicit browser captures, selecting the first configured delivery: sink, endpoint, or legacy PostHog. Omitted or nonfinite sample rates default to one; finite rates are clamped to zero through one and sampled per capture.
import type { ThreadplaneTelemetryConfig } from '@threadplane/telemetry/browser';Declaration
export interface ThreadplaneTelemetryConfig {
enabled: boolean;
endpoint?: string;
posthogHost?: string;
posthogKey?: string;
sampleRate?: number;
sink?: ThreadplaneTelemetrySink;
}Members
enabled
Enables capture methods; false makes the explicit browser service inert.
enabled: boolean;endpoint
Preferred app-owned ingest URL. The browser service POSTs neutral event payloads here; the endpoint decides where they ultimately go.
endpoint?: string;posthogHost
Deprecated
Prefer sink or endpoint so public app code is vendor-neutral.
posthogHost?: string;posthogKey
Deprecated
Prefer sink or endpoint so public app code is vendor-neutral.
posthogKey?: string;sampleRate
sampleRate?: number;sink
Preferred app-owned delivery hook. Use this when the consuming app wants to forward events through its own analytics boundary.
sink?: ThreadplaneTelemetrySink;