Skip to content

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
)
OptionTypeDefaultDescription
api_keystrrequiredYour Auralog project API key.
environmentstr"production"e.g. "production", "staging", "dev". Used for filtering in the dashboard.
endpointstrhttps://ingest.auralog.aiIngest endpoint override (useful for self-hosted or local dev).
flush_intervalfloat5.0Seconds between batched flushes of the log buffer. Errors flush immediately regardless.
capture_errorsboolTrueIf True, uncaught exceptions (main thread, threads, asyncio loops) are auto-reported.

init takes keyword arguments only — this keeps call sites explicit and forward-compatible as we add options.

# ✅ works
init(api_key="k", environment="prod")
# ❌ TypeError
init("k", "prod")

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.

The SDK doesn’t read AURALOG_API_KEY automatically — do it explicitly so it’s obvious where the key comes from:

import os
from auralog import init
init(
api_key=os.environ["AURALOG_API_KEY"],
environment=os.environ.get("APP_ENV", "dev"),
)