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

StatusGroup / Path for requests? #74

Closed
jundong321 opened this issue Nov 18, 2020 · 2 comments
Closed

StatusGroup / Path for requests? #74

jundong321 opened this issue Nov 18, 2020 · 2 comments

Comments

@jundong321
Copy link

Since rejected response can't have labeled path, there is no way to know exactly what request is rejected. Can we add StatusGroup and Path to requests?

@RustedBones
Copy link
Owner

RustedBones commented Nov 24, 2020

Hi @jundong321.
Indeed, this is a conscious design decision that unhandled requests have a fixed label

You must also be careful about cardinality: see here

An attacker can hammer your service with random paths requests that will blow up your registry and also increase costs if you export the metrics to an centralized logging service like datadog or AWS CloudWatch.

There is no easy way to change this behavior. I would advise use a custom rejection handler with a specific handleNotFound that will log the rejected path, or other type of rejection you want to log.

Concerning the status group, it should be available on the rejected responses.

Hope this helps

@jundong321
Copy link
Author

jundong321 commented Nov 24, 2020

thanks for the reply!

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

No branches or pull requests

2 participants