Skip to content
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 ability to exclude paths and statuses from metrics #71

Merged
merged 3 commits into from
Jul 21, 2023

Conversation

riordanp
Copy link
Contributor

Merged the latest changes into #46 (thanks to @kppullin) and added an extra option to the builder to exclude an entire status code from the metrics. Useful to prevent any DoS vulnerability caused by too many 404s causing the metrics response to grow too large.

There is probably a better way to achieve that but I couldn't figure out how to get a list of paths from the service and this works for my use case.

Feel free to merge if it's useful or close otherwise.

kppullin-nt and others added 3 commits February 9, 2021 14:52
This is largely a clone of the Actix Logger middleware's
`exclude` and `exclude_regex` APIs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants