Skip to content

fix(metric_percentiles): use PATCH percentiles/{enable,disable} endpoints#602

Merged
riyazsh merged 2 commits into
mainfrom
riyaz/HAMR-392-metric-percentiles-fix
Jul 6, 2026
Merged

fix(metric_percentiles): use PATCH percentiles/{enable,disable} endpoints#602
riyazsh merged 2 commits into
mainfrom
riyaz/HAMR-392-metric-percentiles-fix

Conversation

@riyazsh

@riyazsh riyazsh commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

metric_percentiles sync currently POSTs to /metric/distribution/summary_aggr, which is not a registered route on the destination API. The auth layer rejects it with a 403 (empty body) before any handler runs, so no metric gets synced.

Fix

Route each metric to one of the two real endpoints based on its include_percentiles value:

  • PATCH /metric/distribution/summary_aggr/percentiles/enable
  • PATCH /metric/distribution/summary_aggr/percentiles/disable

Both accept {"metric_names": [...]} and are gated by metric_tags_write (same scope other metric-config resources already use).

Test plan

  • Re-record integration cassettes against a live env (existing cassettes still reference the old POST URL)
  • Verify a metric with include_percentiles=true on source ends up enabled on destination
  • Verify a metric with include_percentiles=false on source ends up disabled on destination

Status

Draft — pending cassette re-record. Happy to fold in review feedback in parallel.

…ints

POST /metric/distribution/summary_aggr is not a registered route — OBO
rejects with 403 empty-body. Route each metric to PATCH .../percentiles/enable
or .../disable based on include_percentiles, under metric_tags_write scope.

The bulk-toggle endpoints only accept metric_names, so narrow the resource
contract to metric + include_percentiles (group_by/aggr_mode/etc. cannot
be synced via this path and were previously silently dropped).

Cassettes need re-recording. Ref: HAMR-392
@riyazsh riyazsh force-pushed the riyaz/HAMR-392-metric-percentiles-fix branch from 8f5cf6f to 96b1b4c Compare July 5, 2026 03:36
@riyazsh riyazsh marked this pull request as ready for review July 6, 2026 15:49
@riyazsh riyazsh requested a review from a team as a code owner July 6, 2026 15:49
@riyazsh riyazsh merged commit d86a455 into main Jul 6, 2026
19 of 23 checks passed
@riyazsh riyazsh deleted the riyaz/HAMR-392-metric-percentiles-fix branch July 6, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants