Available Variables
| Variable | Description | Default |
|---|---|---|
HEIMDALL_ENDPOINT | Backend OTLP endpoint URL | http://localhost:4318 |
HEIMDALL_ORG_ID | Organization ID from dashboard | default |
HEIMDALL_PROJECT_ID | Project ID for trace grouping | default |
HEIMDALL_SERVICE_NAME | Service name in traces | mcp-server |
HEIMDALL_ENVIRONMENT | Environment tag (e.g., production, staging) | development |
HEIMDALL_ENABLED | Enable/disable tracing | true |
HEIMDALL_API_KEY | API key for authentication (optional) | - |
HEIMDALL_DEBUG | Enable debug logging | false |
HEIMDALL_BATCH_SIZE | Number of spans to batch before sending | 100 |
HEIMDALL_FLUSH_INTERVAL_MS | Flush interval in milliseconds | 5000 |
Configuration Examples
Basic Setup
Set the required environment variables:Production Setup
For production environments, include service name and environment:Development Setup
For local development with debug logging:Disable Tracing
To completely disable tracing (useful for tests):Using .env Files
Python with python-dotenv
Node.js with dotenv
Priority Order
Configuration values are resolved in the following order (highest priority first):- Explicit arguments passed to
HeimdallClient() - Environment variables
- Default values
Docker Configuration
When running in Docker, pass environment variables using-e flags or an env file: