Skip to content

Add axiom regional endpoint configuration #24038

@toppercodes

Description

@toppercodes

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:

  1. Data Locality & Compliance: Route telemetry data through specific geographic regions to comply with data residency requirements (e.g., GDPR, data sovereignty laws)
  2. Reduced Latency: Ingest data through endpoints closer to the data source for improved performance
  3. Regional Infrastructure: Support organisations using region-specific Axiom deployments
  4. Testing Environments: Allow configuration of custom domain regional edges for staging/dev environments
  5. 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-dataset

Workarounds considered:

  1. Using url with full path - but this would break backwards compatibility for existing users
  2. 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-dataset

Enhanced 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/ingest

URLs without paths - maintains backwards compatibility:

url = "https://api.eu.axiom.co"
dataset = "qoo"
# Results in: https://api.eu.axiom.co/v1/datasets/qoo/ingest

Complete examples

Regional edge (new):

region = "mumbai.axiom.co"
dataset = "test-3"
# → https://mumbai.axiom.co/v1/ingest/test-3

Default cloud (unchanged):

dataset = "foo"
# → https://api.axiom.co/v1/datasets/foo/ingest

Custom URL with path:

url = "http://localhost:3400/ingest"
dataset = "meh"
# → http://localhost:3400/ingest

Custom URL without path (backwards compatible):

url = "https://api.eu.axiom.co"
dataset = "qoo"
# → https://api.eu.axiom.co/v1/datasets/qoo/ingest

URL takes precedence:

region = "mumbai.axiom.co"
url = "http://localhost:3400/ingest"
# → http://localhost:3400/ingest (url wins)

Implementation details

  • Add region: Option<String> to AxiomConfig (domain-only, no scheme/path)
  • Enhance url field logic to detect if path is provided
  • Priority order: url > region > default
  • Maintain 100% backwards compatibility

References

Version

v0.50.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    sink: axiomAnything `axiom` sink relatedtype: featureA value-adding code addition that introduce new functionality.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions