CommonLibrary/Telemetry/Client.rs
1#![allow(non_snake_case)]
2
3//! Process-wide PostHog client singleton. Populated once by
4//! `Initialize::Fn`; every `Capture*::Fn` reads through this static.
5//! Sidecars share one client per process, like Mountain's
6//! `Binary/Build/PostHogPlugin/Client`.
7
8use std::sync::OnceLock;
9
10pub static CLIENT:OnceLock<posthog_rs::Client> = OnceLock::new();
11
12/// The Tier that called `Initialize`, captured for default `$component`
13/// + `$tier` enrichment on every event.
14pub static TIER:OnceLock<crate::Telemetry::Tier::Tier> = OnceLock::new();