DevelopmentNodeEnvironment_MicrosoftVSCodeDependency_22NodeVersion_Bundle_Clean_Debug_ElectronProfile_EsbuildCompiler_Mountain/Binary/Build/PostHogPlugin/Constants.rs
1//! Build-time PostHog credentials baked from `.env.Land.PostHog` via
2//! `cargo:rustc-env`. `env!` always resolves at compile time so even a
3//! clean checkout builds without a populated `.env`.
4
5/// PostHog project token (`Authorize` in `.env.Land.PostHog`).
6pub const POSTHOG_API_KEY:&str = env!("Authorize");
7
8/// PostHog ingestion host (`Beam`). Defaults to EU Cloud; operators
9/// override per environment.
10pub const POSTHOG_HOST:&str = env!("Beam");
11
12/// Per-tier enable flag (`Report`). String-comparison gate avoids
13/// forking the binary per env value.
14pub const POSTHOG_ENABLED:&str = env!("Report");
15
16/// Optional pinned distinct-id seed (`Brand`). Empty → auto-generate
17/// per process; populated → pinned across every process in the same
18/// dev run for cross-restart correlation.
19pub const POSTHOG_DISTINCT_ID_SEED:&str = env!("Brand");
20
21/// OTLP collector endpoint (`Pipe`). Default points at the local
22/// Jaeger all-in-one HTTP receiver from `Land/Container/Compose.yaml`.
23/// Read by `IPC::DevLog::EmitOTLPSpan` instead of the previous
24/// hard-coded `127.0.0.1:4318`.
25pub const OTLP_ENDPOINT:&str = env!("Pipe");
26
27/// Per-tier OTLP enable flag (`Emit`). Mirrors `POSTHOG_ENABLED`
28/// for the OTLP pipe. Independent of `Disable` so each pipe can be
29/// flipped separately during diagnosis.
30pub const OTLP_ENABLED:&str = env!("Emit");
31
32/// Master telemetry kill switch (`Capture`). `false` short-circuits BOTH
33/// PostHog and OTLP regardless of their per-pipe toggles. Distinct from
34/// `.env.Land.Diagnostics`'s `Disable` which kills polyfills/shims.
35pub const TELEMETRY_CAPTURE:&str = env!("Capture");
36
37/// Span / element filter (`Trace`). RUST_LOG-shaped string consumed by
38/// the `IPC::DevLog::IsEnabled::Fn` filter. `all` enables every tag.
39/// Reserved for the eventual `tracing-subscriber` EnvFilter; currently
40/// duplicated with `IPC::DevLog::IsEnabled` which reads `Trace` at
41/// runtime via `std::env::var`.
42pub const TRACE_FILTER:&str = env!("Trace");