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
Add prometheus metrics #148
Commits on Mar 2, 2020
-
Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
Toby Lorne committedMar 2, 2020 Configuration menu - View commit details
-
Copy full SHA for f6f7931 - Browse repository at this point
Copy the full SHA f6f7931View commit details -
Add integration test for prometheus metrics
Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk> Co-authored-by: Sebastian <sebastian.schmieschek@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for fdae529 - Browse repository at this point
Copy the full SHA fdae529View commit details -
Add default prometheus metrics to router
When making a request to the API with the path /metrics default prometheus exposition format metrics will be returned Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk> Co-authored-by: Sebastian <sebastian.schmieschek@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for 2ad68f4 - Browse repository at this point
Copy the full SHA 2ad68f4View commit details -
We add metrics for: - internal server errors - routing table reload attempts - routing table reload errors Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk> Co-authored-by: Sebastian <sebastian.schmieschek@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for dff3eaa - Browse repository at this point
Copy the full SHA dff3eaaView commit details -
Add metric for redirect handler redirect count
so we can observe how many redirects have been handled Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk> Co-authored-by: Sebastian <sebastian.schmieschek@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for cb56d93 - Browse repository at this point
Copy the full SHA cb56d93View commit details -
Add metric for currently count of loaded routes
Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk> Co-authored-by: Sebastian <sebastian.schmieschek@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for af5a21e - Browse repository at this point
Copy the full SHA af5a21eView commit details -
Add metric for triemux lookup not found
When we are given a request for which there is no entry in the trie we should increment a counter, so that we can track unknown entries Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk> Co-authored-by: Sebastian <sebastian.schmieschek@digital.cabinet-office.gov.uk> Co-authored-by: Chris <chris.banks@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for 4bea3bd - Browse repository at this point
Copy the full SHA 4bea3bdView commit details -
Add backend handler metric req count / resp secs
We want to measure: * the number of requests * the duration of responses We measure the backend handlers individually, so the metrics are defined as prometheus vectors Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
Toby Lorne committedMar 2, 2020 Configuration menu - View commit details
-
Copy full SHA for 32e5de0 - Browse repository at this point
Copy the full SHA 32e5de0View commit details -
Keep track of backend ID within backend transport
In order for us to instrument each backend handler separately, the backendTransport (which is the handler) needs to know who it is, or at least how it should record its performance Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
Toby Lorne committedMar 2, 2020 Configuration menu - View commit details
-
Copy full SHA for 5ad3181 - Browse repository at this point
Copy the full SHA 5ad3181View commit details -
Instrument backend handler req count / resp secs
Every time the backend handler sees a request, it should increment the request count counter Every time the backend handler responds with a status code, we should record the duration of that request Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
Toby Lorne committedMar 2, 2020 Configuration menu - View commit details
-
Copy full SHA for ee1b938 - Browse repository at this point
Copy the full SHA ee1b938View commit details -
Instrument backend handler response count
Every time the backend handler responds with a status code, we should count that response Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
Toby Lorne committedMar 2, 2020 Configuration menu - View commit details
-
Copy full SHA for b443d3d - Browse repository at this point
Copy the full SHA b443d3dView commit details -
Use a real histogram for backend handler resp secs
Instead of implementing our own way of measuring latency and count, we can use a real histogram instead Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
Toby Lorne committedMar 2, 2020 Configuration menu - View commit details
-
Copy full SHA for b563e9a - Browse repository at this point
Copy the full SHA b563e9aView commit details -
Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
Toby Lorne committedMar 2, 2020 Configuration menu - View commit details
-
Copy full SHA for 91feca2 - Browse repository at this point
Copy the full SHA 91feca2View commit details -
Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
Toby Lorne committedMar 2, 2020 Configuration menu - View commit details
-
Copy full SHA for eb014f6 - Browse repository at this point
Copy the full SHA eb014f6View commit details -
Add a make task to pretty print metric names
Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
Toby Lorne committedMar 2, 2020 Configuration menu - View commit details
-
Copy full SHA for 0c29314 - Browse repository at this point
Copy the full SHA 0c29314View commit details
Commits on Mar 3, 2020
-
``` make run --- curl http://localhost:8081/metrics | promtool check metrics echo $? => 0 ``` Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk> Co-authored-by: Philip <philip.potter@digital.cabinet-office.gov.uk>
Configuration menu - View commit details
-
Copy full SHA for 6b1e0e8 - Browse repository at this point
Copy the full SHA 6b1e0e8View commit details
Commits on Mar 20, 2020
-
Add comment clarifying use of stripQuery
because of how http.Redirect works (does not necessarily take a url.URL but rather a string), we stripQuery using a string not a URL we do not need to catch this error because the provenance of the URL argument to stripquery is from a url.URL. However future contributors should be aware of this nuance Signed-off-by: toby lorne <toby@toby.codes>
Configuration menu - View commit details
-
Copy full SHA for b8f84f0 - Browse repository at this point
Copy the full SHA b8f84f0View commit details -
Use pkg http status codes in handlers
We should use the descriptive names of the status codes, instead of the number This also capitalises the response body of 410 Gone because consistency Signed-off-by: toby lorne <toby@toby.codes>
Configuration menu - View commit details
-
Copy full SHA for c866a6b - Browse repository at this point
Copy the full SHA c866a6bView commit details -
Move the reload route count metric inside the defer
and add a clarifying comment to demonstrate that the metric should always get incremented Signed-off-by: toby lorne <toby@toby.codes>
Configuration menu - View commit details
-
Copy full SHA for 4e1bad2 - Browse repository at this point
Copy the full SHA 4e1bad2View commit details -
Add make task for checking metrics using promtool
Signed-off-by: toby lorne <toby@toby.codes>
Configuration menu - View commit details
-
Copy full SHA for de41b23 - Browse repository at this point
Copy the full SHA de41b23View commit details -
Add metric information in README
Signed-off-by: toby lorne <toby@toby.codes>
Configuration menu - View commit details
-
Copy full SHA for 84aeed9 - Browse repository at this point
Copy the full SHA 84aeed9View commit details