Configuration
from auralog import init
init( api_key="aura_your_api_key", environment="production", # default endpoint="https://ingest.auralog.ai", # default flush_interval=5.0, # seconds capture_errors=True, # default)Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
api_key | str | required | Your Auralog project API key. |
environment | str | "production" | e.g. "production", "staging", "dev". Used for filtering in the dashboard. |
endpoint | str | https://ingest.auralog.ai | Ingest endpoint override (useful for self-hosted or local dev). |
flush_interval | float | 5.0 | Seconds between batched flushes of the log buffer. Errors flush immediately regardless. |
capture_errors | bool | True | If True, uncaught exceptions (main thread, threads, asyncio loops) are auto-reported. |
Keyword-only
Section titled “Keyword-only”init takes keyword arguments only — this keeps call sites explicit and forward-compatible as we add options.
# ✅ worksinit(api_key="k", environment="prod")
# ❌ TypeErrorinit("k", "prod")Idempotent
Section titled “Idempotent”Calling init again replaces the previous configuration and flushes the prior transport — useful in long-lived workers where you want to rotate the API key without restarting the process.
Reading from the environment
Section titled “Reading from the environment”The SDK doesn’t read AURALOG_API_KEY automatically — do it explicitly so it’s obvious where the key comes from:
import osfrom auralog import init
init( api_key=os.environ["AURALOG_API_KEY"], environment=os.environ.get("APP_ENV", "dev"),)