-
Couldn't load subscription status.
- Fork 1.9k
Description
A note for the community
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Use Cases
Axiom is introducing regional edge endpoints to enable data ingestion through region-specific URLs. This requires Vector's Axiom sink to support these new endpoints.
End goals:
- Data Locality & Compliance: Route telemetry data through specific geographic regions to comply with data residency requirements (e.g., GDPR, data sovereignty laws)
- Reduced Latency: Ingest data through endpoints closer to the data source for improved performance
- Regional Infrastructure: Support organisations using region-specific Axiom deployments
- Testing Environments: Allow configuration of custom domain regional edges for staging/dev environments
- Local Development: Support custom endpoints like localhost for development workflows
The regional edge endpoints use a different URL structure:
- Regional edge format:
https://{region}/v1/ingest/{dataset} - Legacy cloud format:
https://api.axiom.co/v1/datasets/{dataset}/ingest
Attempted Solutions
Current limitation: The existing url field always appends the legacy path format /v1/datasets/{dataset}/ingest, making it impossible to use regional edges which require the new format /v1/ingest/{dataset}.
Example of what doesn't work:
[sinks.axiom]
type = "axiom"
token = "${AXIOM_TOKEN}"
dataset = "my-dataset"
url = "https://eu-central-1.aws.edge.axiom.co"
# This incorrectly generates:
# https://eu-central-1.aws.edge.axiom.co/v1/datasets/my-dataset/ingest
# Instead of the required:
# https://eu-central-1.aws.edge.axiom.co/v1/ingest/my-datasetWorkarounds considered:
- Using
urlwith full path - but this would break backwards compatibility for existing users - Adding a separate boolean flag - unnecessarily complex for users
Proposal
Add a new optional region field for regional edge domains and enhance the url field with intelligent path detection.
Configuration priority: url > region > default cloud endpoint
New region field
Accepts domain-only format (no scheme, no path):
[sinks.axiom]
type = "axiom"
token = "${AXIOM_TOKEN}"
dataset = "my-dataset"
region = "eu-central-1.aws.edge.axiom.co"
# Results in: https://eu-central-1.aws.edge.axiom.co/v1/ingest/my-datasetEnhanced url field with smart path detection
URLs with custom paths - used as-is:
url = "http://localhost:3400/ingest"
dataset = "meh"
# Results in: http://localhost:3400/ingestURLs without paths - maintains backwards compatibility:
url = "https://api.eu.axiom.co"
dataset = "qoo"
# Results in: https://api.eu.axiom.co/v1/datasets/qoo/ingestComplete examples
Regional edge (new):
region = "mumbai.axiom.co"
dataset = "test-3"
# → https://mumbai.axiom.co/v1/ingest/test-3Default cloud (unchanged):
dataset = "foo"
# → https://api.axiom.co/v1/datasets/foo/ingestCustom URL with path:
url = "http://localhost:3400/ingest"
dataset = "meh"
# → http://localhost:3400/ingestCustom URL without path (backwards compatible):
url = "https://api.eu.axiom.co"
dataset = "qoo"
# → https://api.eu.axiom.co/v1/datasets/qoo/ingestURL takes precedence:
region = "mumbai.axiom.co"
url = "http://localhost:3400/ingest"
# → http://localhost:3400/ingest (url wins)Implementation details
- Add
region: Option<String>toAxiomConfig(domain-only, no scheme/path) - Enhance
urlfield logic to detect if path is provided - Priority order: url > region > default
- Maintain 100% backwards compatibility
References
Version
v0.50.0