diff options
| author | nicdillon <nicholas.dillon@vercel.com> | 2026-10-28 11:40:52 -0400 |
|---|---|---|
| committer | nicdillon <nicholas.dillon@vercel.com> | 2026-10-28 11:40:52 -0400 |
| commit | a2f5f8e863ce1de53915bddffbbf9a08b2ac327f (patch) | |
| tree | 16be89057e655ce532aabc9b298d711e5ddc0edc /package.json | |
| parent | 1a2c79d4e6c4a2283dc2c614b6538cbe1ed5ca62 (diff) | |
vercel-optimize: make metric queries work on current Vercel CLIsvercel-optimize/count-aggregation-fallback
Metric queries were written against CLI v53.4.0. Current CLIs (seen on 62.5.0
and 65.2.0) changed three things, so 16 of 32 queries failed with
invalid_request, including the Observability Plus canary in collect-signals.
Audits then reported Observability Plus as unusable (blocker=all_failed_other)
on teams that have it.
1. *.count metrics allow only count/unique; the skill used sum.
2. Dimensions are camelCase (originHostname, cacheResult, botCategory,
requestPath, sourceImageHostname, wafAction, ...).
3. Metrics were renamed: speed_insights_metric.{lcp,inp,cls,ttfb_ms} ->
speed_insights.{lcp_ms,inp_ms,cls,ttfb_ms}; speed_insights_metric.count was
removed (sample volume now comes from the count of LCP samples);
middleware_invocation.duration_ms -> request_duration_ms.
queryMetric now retries a rejected query in the current form
(modernizeMetricQuery) and maps the response back to the legacy metric,
aggregation, and dimension names (restoreLegacyMetricShape). Callers, gates,
and the v53.4.0 fixtures are unchanged, and older CLIs keep the original
query.
Verified against `vercel metrics schema <metric>` on CLI 65.2.0. With the
first part of this fix, the canary passed and request-count queries returned
56 rows on a team with Observability Plus.
Repro:
vercel metrics vercel.request.count --format json -a sum --since 14d --limit 1
-> {"error":{"code":"invalid_request"}}
vercel metrics vercel.request.count --format json --since 14d --limit 1
-> summary [{ vercel_request_count_count: 257 }]
Diffstat (limited to 'package.json')
0 files changed, 0 insertions, 0 deletions
