Repository navigation
[skills] Sync cdn-caching with current docs - #463
Merged
Merged
Conversation
<!-- vercel-plugin-drift-agent -->
…EGACY_METRICS, drop sum on request count - `cache_tags` -> `cacheTags` and `triggering_tag` -> `triggeringTag` in the `vercel metrics` examples, and drop the "aren't confirmed" note. The Observability metrics API accepts only its camelCase catalog names: `vercel.request.count` lists `cacheTags`, `cacheReason`, `pprState` and `triggeringTag`; `vercel.isr_operation.*` lists `cacheTags` and has no `triggeringTag`. - `FF_LEGACY_METRICS=1` exists only on CLI 59.12-65.11. CLI 65.12.0 removed it and always uses the Observability metrics API. - Drop `--aggregation sum` from the two `vercel.request.count` commands. Count metrics accept only `count` and `unique` on the Observability metrics API, and the CLI picks `count` when the flag is omitted. - Say what CLIs before 59.12 need: the legacy API's snake_case names and OData filters. Sources: - @vercel/o11y-tools@0.105.0/dist/contracts/metrics.mjs (metric catalog: `countAggregations` is ["count", "unique"] and `vercel.request.count` is a count metric over `incomingRequestDimensions`, which lists `cacheTags`, `pprState` and `triggeringTag`; `isrOperationDimensions` lists `cacheTags` and no `triggeringTag`) - vercel@59.11.7 dist (new API opt-in via FF_METRICS), vercel@59.12.0 dist (FF_LEGACY_METRICS added) - @vercel/cli-support@65.11.0/dist/chunks/query-67KQVLTR.js (FF_LEGACY_METRICS present), @vercel/cli-support@65.12.0 dist (FF_LEGACY_METRICS absent from every file) - vercel/vercel@155eacfa1684:packages/cli/CHANGELOG.md (59.12.0 ef5c9f7, 59.16.0 0239c8e) - vercel/vercel@155eacfa1684:packages/cli/src/commands/metrics/query.ts (default aggregation falls back to count; group-by and filter names are sent unchanged) - vercel/vercel@155eacfa1684:packages/cli/src/commands/metrics/command.ts (legacy API: OData filters, snake_case names) - https://vercel.com/docs/cli/metrics
molebox
approved these changes
Nov 26, 2026
molebox
left a comment
Contributor
There was a problem hiding this comment.
Sent from Rich's agents review
Verified the drift commit cba1d15 against the published CLI and the published metric catalog, and pushed fix commit ffecb6a.
- The camelCase names hold for
vercel.request.countandvercel.isr_operation.*:cacheResult,pathType,requestPath,requestMethod,clientUserAgent,botCategory,cacheReason,pprState. Sources:@vercel/o11y-tools@0.105.0/dist/contracts/metrics.mjs, https://vercel.com/docs/cli/metrics, https://vercel.com/kb/guide/how-to-reduce-isr-revalidation-costs - The Observability metrics API is the default since CLI 59.12:
vercel/vercel@155eacf:packages/cli/CHANGELOG.md(59.12.0). - Fixed:
FF_LEGACY_METRICSexists only on CLI 59.12-65.11.@vercel/cli-support@65.11.0/dist/chunks/query-67KQVLTR.jshas it; no file in@vercel/cli-support@65.12.0does. - Fixed:
cache_tagstocacheTagsandtriggering_tagtotriggeringTag, and removed the "aren't confirmed" note. The catalog listscacheTags,pprStateandtriggeringTagfor request count, andcacheTagsfor ISR operations. - Fixed: dropped
--aggregation sumfrom the twovercel.request.countcommands. In the catalog, count metrics takecountorunique, and the CLI defaults tocount. - #417 edits the same block and will need a rebase after this merges. Both sides agree on
cacheResultand oncountfor request count.
Gated head c0d8209 (this branch merged with main abe19cc): bun run build:all leaves no diff; typecheck, validate and bun test pass; CI build-and-test passes on it.
Merged
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.
The
vercel metricsexamples in this skill used the old snake_case dimension names (cache_result,path_type,request_path,cache_reason,ppr_state,bot_category,request_method,user_agent). Those names belong to the legacy metrics backend. Since Vercel CLI 59.12.0,vercel metricsuses the new Observability metrics API by default, and that API names dimensions in camelCase. The CLI sends--group-byand-qnames to that API unchanged. Its own help examples switch to camelCase when the new API is in use (packages/cli/src/commands/metrics/command.ts:const httpStatus = canonical ? 'httpStatus' : 'http_status';).--group-by cache_reason→--group-by cacheReason. Source: https://vercel.com/kb/guide/how-to-reduce-isr-revalidation-costs (last_updated 2026-11-06): "vercel metrics vercel.request.count --group-by cacheReason --since 24h".cache_result(filters, group-by, prose) →cacheResult, and--group-by request_method→--group-by requestMethod. Source: https://vercel.com/docs/cli/logs (last_updated 2026-02-10), which queries the same Observability API: "vercel logs requests --query 'requestMethod:POST AND cacheResult:MISS'".request_path→requestPath. Source: https://vercel.com/docs/cli/metrics (last_updated 2026-09-10): "vercel metrics <metric_name> --query 'requestPath:(/docs* OR /guides*)'". The same page also usesprojectId,httpStatusanderrorCode.path_type→pathType. Source: https://vercel.com/docs/observability/custom-metrics listspathType("Execution path type that emitted the metric.") among the metadata Vercel collects automatically for metrics.--group-by bot_category→--group-by botCategory, and--group-by user_agent→--group-by clientUserAgent. Source:packages/cli/src/util/firewall/dimensions.ts, which definesfield: 'botCategory'andalias: 'user-agent', field: 'clientUserAgent'. The firewall commands query the same Observability API.--group-by ppr_state→--group-by pprState. This is the inferred camelCase name: no docs page or current CLI source confirmspprStateas a metrics dimension. The intro note flags it for checking withvercel metrics schema.packages/cli/CHANGELOG.md59.12.0 (ef5c9f7): "Use the new Observability metrics API by default, surface its rate limits without retrying, and addFF_LEGACY_METRICS=1to restore the legacy metrics behavior." For firewall queries on the same engine, the CHANGELOG adds (0239c8e) that "the dimension names it accepts are the schema's camelCase ones".vercel metricsuses the Observability metrics API by default since CLI 59.12, with camelCase dimension names (FF_LEGACY_METRICS=1falls back to the legacy API and its snake_case names). It also asks readers to checkpprState,cache_tags, andtriggering_tagwithvercel metrics schemabefore running those examples.Verification
run_plugin_checkspassed every step: build, typecheck, validate, and test (1364 pass, 0 fail).Test updates
None.
Not changed
--group-by cache_tagsandtriggering_tag(filter and group-by) keep their legacy names. No docs page or CLI source confirms their camelCase names; the intro note flags them instead.REVALIDATED… (orPragma: no-cache)" is not on https://vercel.com/docs/caching/cache-status or https://vercel.com/docs/headers/response-headers. Left as is.vercel logs requestsis left as is. CLI source (packages/cli/src/commands/logs/errors.ts) also accepts "the Enterprise Agents & Apps entitlement".retrieval/promptSignalsentries (ppr_state, etc.) are matching fields and were not touched.skills/vercel-cli/references/monitoring-and-debugging.md(and itsupstream/copy) still use the legacyhttp_status,error_code, andproject_idmetrics dimensions. That is a different skill, so it needs its own follow-up.Opened automatically by the vercel-plugin drift agent. Review before merge.