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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
f6f7931
Run gofmt
fdae529
Add integration test for prometheus metrics
2ad68f4
Add default prometheus metrics to router
dff3eaa
Add high level router metrics
cb56d93
Add metric for redirect handler redirect count
af5a21e
Add metric for currently count of loaded routes
4bea3bd
Add metric for triemux lookup not found
32e5de0
Add backend handler metric req count / resp secs
5ad3181
Keep track of backend ID within backend transport
ee1b938
Instrument backend handler req count / resp secs
b443d3d
Instrument backend handler response count
b563e9a
Use a real histogram for backend handler resp secs
91feca2
Run go mod tidy
eb014f6
Run go mod vendor
0c29314
Add a make task to pretty print metric names
6b1e0e8
Make metrics pass promtool
b8f84f0
Add comment clarifying use of stripQuery
tlwr c866a6b
Use pkg http status codes in handlers
tlwr 4e1bad2
Move the reload route count metric inside the defer
tlwr de41b23
Add make task for checking metrics using promtool
tlwr 84aeed9
Add metric information in README
tlwr File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
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.
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.
I'm not sure about the value of a
backendID
if backend URLs are expected to be unique. Could we use the URL as the ID here?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.
I wasn't sure if using the URL or the ID was better, and didn't check in the database how they looked.
One side-effect of the backend ID, is that they are easier to type:
Also another "feature" is that if the backend URL is changed in the database, the metric will stay the same. Whether in practice this would ever happen is not something I know.
Presumably the IDs are more consistent across environments (staging/prod) than URLs? This is a question to which I do not know the answer.
What do you think is more ergonomic/intuitive?