Skip to content

feat: add edge urls#15

Open
aisha331 wants to merge 5 commits intomainfrom
aisha/add-edge-endpoints
Open

feat: add edge urls#15
aisha331 wants to merge 5 commits intomainfrom
aisha/add-edge-endpoints

Conversation

@aisha331
Copy link
Copy Markdown

@aisha331 aisha331 commented Mar 11, 2026

  • use edge URLs for query and ingest

Note

Medium Risk
Updates Axiom CLI scripts to dynamically pick edge domains for queries and ingestion, adding caching and fallback logic that could change which endpoints are hit and how failures surface.

Overview
Adds automatic edge URL resolution for Axiom query/ingest traffic. axiom-query now calls the edge query endpoint (/v1/query/_apl) and iterates over discovered edge domains (cached, with a last-good fast path) until one succeeds.

axiom-api now detects /v1/ingest/* requests and rewrites the base URL to a dataset-specific edge domain using a new resolve-url helper that caches dataset→edge mappings and region metadata.

Docs (axiom.md) are updated to distinguish management vs query/ingest base URLs, document the edge query endpoint, and simplify auth guidance.

Written by Cursor Bugbot for commit 80e10d3. This will update automatically on new commits. Configure here.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gilfoyle Ready Ready Preview, Comment Mar 13, 2026 9:41am

Request Review

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
eval "$("$SCRIPT_DIR/config" axiom "$DEPLOYMENT")"

# Auto-resolve edge URL for query and ingest endpoints
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you explain what's going on here? Why do we need to auto-resolve anything? Why don't we use the configured axiom url directly?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

because core APIs for ingest and query will be deprecated as part of multiregion, we're moving to route those directly to the edge endpoint. This also correctly handles multi region ds, since queries go to the right regional edge

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

-H "Content-Type: application/json" \
-d "$PAYLOAD")
if [[ "$HTTP_CODE" -ge 200 && "$HTTP_CODE" -lt 300 ]]; then
echo "$QUERY_URL" > "$LAST_EDGE_CACHE"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Problem: Agents can run multiple queries concurrently. This would be a race condition, this would clobber that file. We need a different solution. Is there a backend endpoint that returns the canonical edge URL for each dataset in an org? We already run the discover-axiom script, it would be ideal for that script to not only output the dataset names but which region they are in. Then the model can use the right region in the queries. We'll need to add the region flag / argument to most axiom scripts. We'll need an eval for this.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants