Service Discovery
LogFlux provides automatic service discovery so SDKs and agents can connect to the correct regional endpoints without manual URL configuration.
How It Works
Region-Prefixed Keys
When you create an API key or Personal Access Token (PAT) through the LogFlux dashboard, the key includes a region prefix based on your account’s data residency setting:
| Data Residency | API Key Format | PAT Format |
|---|---|---|
| EU | eu-lf_abc123... | eu-lf_usr_abc123... |
| US | us-lf_abc123... | us-lf_usr_abc123... |
| CA | ca-lf_abc123... | ca-lf_usr_abc123... |
| AU | au-lf_abc123... | au-lf_usr_abc123... |
| AP | ap-lf_abc123... | ap-lf_usr_abc123... |
The region prefix tells SDKs and agents which regional endpoints to use. API Keys (lf_) are used by agents and SDKs for log ingestion, while PATs (lf_usr_) are used by CLI tools and Grafana for log queries. See Authentication Setup for details on when to use each.
Legacy keys without a region prefix continue to work — they use the authenticated discovery fallback.
Static Discovery Endpoints
Each region has a static, unauthenticated discovery endpoint:
| Region | Discovery URL |
|---|---|
| EU (Frankfurt) | https://discover.eu.logflux.io |
| US (Virginia) | https://discover.us.logflux.io |
| CA (Montreal) | https://discover.ca.logflux.io |
| AU (Sydney) | https://discover.au.logflux.io |
| AP (Singapore) | https://discover.ap.logflux.io |
These endpoints return a JSON response with the regional service URLs:
| |
Discovery Flow
When an SDK initializes with a region-prefixed key:
- Extract region from the key prefix (e.g.,
eufromeu-lf_abc123...) - Fetch static discovery from
https://discover.{region}.logflux.io - Connect to the returned regional endpoints
- Fall back to authenticated discovery via the API Service if static discovery is unavailable
For legacy keys without a region prefix, SDKs use the authenticated discovery endpoint directly.
SDK Configuration
With region-prefixed keys, you typically only need to provide the key — no server URL required:
Go SDK
| |
Environment Variables
| |
Data Residency
The region prefix on your keys corresponds to your account’s data residency setting. This determines where your log data is stored and processed:
| Region | Data Location | Compliance |
|---|---|---|
| EU | Frankfurt, Germany | GDPR |
| US | Virginia, USA | SOC 2 |
| CA | Montreal, Canada | PIPEDA |
| AU | Sydney, Australia | Privacy Act |
| AP | Singapore | PDPA |
You can set your data residency when creating your account or by contacting support.
Backward Compatibility
- Legacy keys (without region prefix) continue to work with all LogFlux services
- Region prefix is metadata only — it does not affect key validation or HMAC computation
- No migration required — existing keys and configurations remain functional
Troubleshooting
Verify Discovery
| |
Common Issues
- No region prefix: Legacy token — set
LOGFLUX_SERVER_URLexplicitly or create a new token - Wrong region: Create a new token after updating your data residency setting
- Discovery timeout: Check firewall rules for outbound HTTPS to
*.logflux.io:443
Related Documentation
- Authentication Setup - Token creation and configuration
- Architecture Overview - System architecture and components
- Configuration Examples - SDK and agent configuration patterns
- Security Best Practices - Secure token management