Repository navigation
fix(cloudflare): read DNS analytics from the GraphQL Analytics API - #9187
Draft
volodymyrshk wants to merge 1 commit into
Draft
volodymyrshk wants to merge 1 commit into
volodymyrshk wants to merge 1 commit into
Conversation
Cloudflare removes GET /zones/{zone_id}/dns_analytics/report on 2026-12-01. The cloudflare_dns_analytics tool now queries dnsAnalyticsAdaptiveGroups and maps it back onto the report output shape, so existing workflows keep their outputs. Metrics and dimensions the GraphQL dataset lacks are rejected with a clear error instead of returning zeros; block hints updated to the supported set. Refs simstudioai#9186.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #9186.
Cloudflare removes GET /zones/{zone_id}/dns_analytics/report on December 1, 2026 (https://developers.cloudflare.com/fundamentals/api/reference/deprecations/), so
cloudflare_dns_analyticswould fail for every workflow using it.What this does:
dnsAnalyticsAdaptiveGroups) and maps the grouped rows back onto the existing report output (totals, data rows with parallel dimensions/metrics arrays, rows, query echo), so saved workflows keep reading the same fields.field==valuejoined by;; sort like-queryCount; since/until as ISO dates or relative (-7d), now filtered by day; limit (default 100, max 10000).Tests: replaced the REST-envelope DNS analytics tests with GraphQL ones (request URL/method/body, validation errors, mapping, GraphQL error). I ran the tool logic under Node with stubbed imports (passes); I couldn't run vitest, tsc or Biome locally, so CI is the real check.
Not verified against a live zone: field names come from Cloudflare's docs examples. Happy to adjust if the schema explorer says otherwise, or if you'd prefer a new tool and version over changing this one.