fix(metric_percentiles): use PATCH percentiles/{enable,disable} endpoints#602
Merged
Conversation
…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
8f5cf6f to
96b1b4c
Compare
nathantournant
approved these changes
Jul 6, 2026
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.
Summary
metric_percentilessync 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_percentilesvalue:PATCH /metric/distribution/summary_aggr/percentiles/enablePATCH /metric/distribution/summary_aggr/percentiles/disableBoth accept
{"metric_names": [...]}and are gated bymetric_tags_write(same scope other metric-config resources already use).Test plan
include_percentiles=trueon source ends up enabled on destinationinclude_percentiles=falseon source ends up disabled on destinationStatus
Draft — pending cassette re-record. Happy to fold in review feedback in parallel.