Skip to content

Environment variables

Required

VariableDescription
AMLEXIA_SDK_KEYProject SDK key from the dashboard (am_...). Server-side only.
VariableDefaultDescription
AMLEXIA_INGEST_URLhttps://ingest.amlexia.comIngest API base URL
AMLEXIA_ENVIRONMENTLabel on events: production, staging, etc.
AMLEXIA_RELEASEDeploy version or git SHA
AMLEXIA_SERVICE_NAMEapi (Django)Service name on HTTP events

Node.js

NODE_ENV is used as default environment on trace context when not set on the event.

typescript
const client = new AmlexiaClient({
  sdkKey: process.env.AMLEXIA_SDK_KEY!,
  ingestUrl: process.env.AMLEXIA_INGEST_URL,
});

Python

python
from amlexia import AmlexiaClient
client = AmlexiaClient.from_env()

Reads AMLEXIA_SDK_KEY, AMLEXIA_INGEST_URL, AMLEXIA_ENVIRONMENT, AMLEXIA_RELEASE.

Local development

Point ingest at your local worker when running the full platform:

env
AMLEXIA_INGEST_URL=http://localhost:8787

HTTP headers (middleware)

HeaderPurpose
x-session-idAttach end-user session to traces
x-user-idAttach user id to traces

Security

  • Add placeholders to .env.example, never real keys.
  • Do not use NEXT_PUBLIC_ or browser env for the SDK key.
  • Rotate keys from the dashboard if leaked.