Refactor Warp Filter Initialization For Metrics Reset #789
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.
This PR refactors how we initialize our
warp
router and ensures that metrics are initialized for all requests.This is a QOL change to improve Grafana metrics around API request responses. This is because, if we don't reset metrics to 0 they don't exist at all until the first time we increment their counter. This causes no-data alerts in Grafana alerts and can make panels weird to look at.
Test Plan
Run some sample queries and see they still work:
Also, fetch metrics and see we initialized a bunch of request metrics: