refactor: move metrics out of /rules(/:id) to /rules/:id/metrics #9461
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.
Fixes EMQX-7988
Summary:
GET /rules/:id/metrics
explicitly in order to get metrics to a given rule. To reset metrics of a given you resource youPUT /rules/:id/metrics/reset
./rules/:id/metrics/reset
now returns204
instead of200
to comply with rest of API:id
a404
is returned in case rule does not existIf your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/emqx/emqx/blob/master/CONTRIBUTING.md.
PR Checklist
Please convert it to a draft if any of the following conditions are not met. Reviewers may skip over until all the items are checked:
changes/
dirFor EMQX 4.x:appup
files updated (executescripts/update-appup.sh emqx
)If there should be document changes, a PR to emqx-docs.git is sent, or a jira ticket is created to follow upIn case of non-backward compatible changes, reviewer should check this item as a write-off, and add details in Backward Compatibility sectionBackward Compatibility
More information