Skip to content

resolveAxiomFromEnv

resolveAxiomFromEnv(env?): AxiomTransportConfig | undefined

Defined in: observability/src/logger/context.ts:75

Resolve Axiom credentials from the environment — the canonical fallback chain from ADR-0007. createLogger calls this when no explicit config.axiom is supplied, so every consumer gets Axiom activation from env vars alone. Credentials are read here and only here — never from a config file.

Returns undefined unless BOTH a token and a dataset are present.

Value Primary Fallback
token HOLOCRON_AXIOM_TOKEN AXIOM_TOKEN
dataset HOLOCRON_AXIOM_DATASET AXIOM_DATASET

ProcessEnv

AxiomTransportConfig | undefined