-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Access] Update REST metrics to use route name for all types #4571
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4571 +/- ##
==========================================
- Coverage 56.25% 49.73% -6.52%
==========================================
Files 653 98 -555
Lines 64699 6651 -58048
==========================================
- Hits 36396 3308 -33088
+ Misses 25362 3175 -22187
+ Partials 2941 168 -2773
Flags with carried forward coverage won't be shown. Click here to find out more.
|
module/metrics/rest_api.go
Outdated
// mapURLToRoute uses the urlToRouteMapper callback to convert a URL to a route name | ||
// This normalizes the URL, removing dynamic information converting it to a static string | ||
func (r *RestCollector) mapURLToRoute(url string) string { | ||
if r.urlToRouteMapper == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the code, this callback should never be set to nil. We should return an error in the constructor if it is, that should indicate a bug.
bors merge |
4571: [Access] Update REST metrics to use route name for all types r=peterargue a=peterargue The REST metrics handler passes the original route into the collector, causing high cardinality and performance issues on the prometheus servers. We attempted to fix this with #4452, but only updated 1 of 4 metrics that were reporting the URL. This PR updates all metrics to use the mapped route name. It also removes a bunch of unnecessary config and aligns the collector with the other metrics collectors in flow-go Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
Build failed: |
bors merge |
4571: [Access] Update REST metrics to use route name for all types r=peterargue a=peterargue The REST metrics handler passes the original route into the collector, causing high cardinality and performance issues on the prometheus servers. We attempted to fix this with #4452, but only updated 1 of 4 metrics that were reporting the URL. This PR updates all metrics to use the mapped route name. It also removes a bunch of unnecessary config and aligns the collector with the other metrics collectors in flow-go Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
Build failed: |
The REST metrics handler passes the original route into the collector, causing high cardinality and performance issues on the prometheus servers. We attempted to fix this with #4452, but only updated 1 of 4 metrics that were reporting the URL.
This PR updates all metrics to use the mapped route name. It also removes a bunch of unnecessary config and aligns the collector with the other metrics collectors in flow-go