Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@toppercodes
Copy link

@toppercodes toppercodes commented Oct 21, 2025

Summary

Axiom is working on adding regional ingest endpoints.
This PR introduces a new region field in AxiomConfig to specify the Axiom regional edge domain for data ingestion, and enhances the url field with intelligent path detection.

Configuration priority: url > region > default cloud endpoint

Key features:

  • region: Domain-only format (e.g., mumbai.axiom.co) - automatically builds https://{region}/v1/ingest/{dataset}
  • url: Smart path handling
    • URLs with custom paths are used as-is
    • URLs without paths maintain backwards compatibility by appending /v1/datasets/{dataset}/ingest
  • Fully backwards compatible with existing configurations

Vector configuration

Using regional edge:

[sinks.axiom]
type = "axiom"
token = "${AXIOM_TOKEN}"
dataset = "my-dataset"
region = "eu-central-1.aws.edge.axiom.co"
# Result: https://eu-central-1.aws.edge.axiom.co/v1/ingest/my-dataset

Using URL with custom path (super special case):

[sinks.axiom]
type = "axiom"
token = "${AXIOM_TOKEN}"
dataset = "meh"
url = "http://localhost:3400/ingest"
# Result: http://localhost:3400/ingest (used as-is)

Using URL without path (backwards compatible):

[sinks.axiom]
type = "axiom"
token = "${AXIOM_TOKEN}"
dataset = "qoo"
url = "https://api.eu.axiom.co"
# Result: https://api.eu.axiom.co/v1/datasets/qoo/ingest

Traditional configuration (unchanged):

[sinks.axiom]
type = "axiom"
token = "${AXIOM_TOKEN}"
dataset = "foo"
# Result: https://api.axiom.co/v1/datasets/foo/ingest

URL takes precedence over region:

[sinks.axiom]
type = "axiom"
token = "${AXIOM_TOKEN}"
dataset = "test"
region = "mumbai.axiom.co"
url = "http://localhost:3400/ingest"
# Result: http://localhost:3400/ingest (url wins)

How did you test this PR?

  • Added comprehensive unit tests covering all scenarios:
    • ✅ Regional edge endpoint generation (domain-only format)
    • ✅ URL with custom path (used as-is)
    • ✅ URL without path (backwards compatibility with legacy path format)
    • ✅ URL takes precedence over region when both are set
    • ✅ Default cloud endpoint when neither is set
    • ✅ Support for production, staging, and dev environments
    • ✅ Trailing slash handling
  • All existing tests continue to pass, confirming full backward compatibility

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

Changelog fragment added: changelog.d/axiom_regional_edges.feature.md

References

#24038

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

@toppercodes toppercodes requested a review from a team as a code owner October 21, 2025 15:06
@github-actions github-actions bot added the domain: sinks Anything related to the Vector's sinks label Oct 21, 2025
@toppercodes toppercodes force-pushed the feat-support-axiom-edges branch 2 times, most recently from c448a3c to 06e0f8e Compare October 21, 2025 18:26
Introduces optional `region` field for regional edge domains and enhances
`url` field with intelligent path detection. URLs with custom paths are
used as-is, while URLs without paths maintain backwards compatibility by
appending the legacy path format.

Priority: url > region > default cloud endpoint

Fully backwards compatible with existing configurations.
@toppercodes toppercodes force-pushed the feat-support-axiom-edges branch from 06e0f8e to 9bf1a13 Compare October 21, 2025 19:09
Copy link

@ronoc ronoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: sinks Anything related to the Vector's sinks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants