/** * Environment-variable gates for analytics. Pure functions — safe to import * anywhere, no Sentry side effects. Tested directly in `analytics.test.js`. */ /** * Read a process env var without crashing in browsers or in bundles where * `process.env` is a frozen / proxied object that throws on missing keys. */ export declare function readEnv(name: string): string | undefined; /** * `AUGUST_SDK_FORCE_ANALYTICS=1` bypasses the dev/test and localhost gates. * Used by our own smoke-test script and by partners deliberately exercising * telemetry in a non-prod environment. */ export declare function isAnalyticsForcedOnViaEnv(): boolean; /** * `AUGUST_SDK_DISABLE_ANALYTICS=1` is the env equivalent of passing * `analytics: { enabled: false }`. Useful when partners can't easily plumb * config through (CI runners, ops scripts). */ export declare function isAnalyticsDisabledViaEnv(): boolean; /** * True when `NODE_ENV` is `'development'` or `'test'`. The SDK auto-disables * analytics in these environments so partners' local dev runs and Jest suites * don't pollute the production Sentry project. * * `NODE_ENV` undefined / `'production'` / `'staging'` / anything else → false. */ export declare function isNodeDevOrTestEnv(): boolean; /** * True when the page is being served from a developer's own machine or private * network. * * The browser counterpart to {@link isNodeDevOrTestEnv}: bundlers strip or * stub `process.env`, so `NODE_ENV` cannot tell a `next dev` tab apart from a * production deploy. The hostname can. Always false in Node, where * `NODE_ENV` is the gate. * * Recognises `localhost` and the `.localhost` TLD (RFC 6761 reserves both for * loopback), mDNS `.local` names, and any loopback / private / link-local IP * literal in either address family. Anything else — including a public host * that merely *contains* one of those names, like `localhost.acme.com` — is * treated as a real deployment, because suppressing a genuine production * origin is the more costly mistake of the two. */ export declare function isLocalhost(): boolean;