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

URI_TEMPLATE not set for pre-flight requests #189

Open
luckyswede opened this issue Oct 6, 2020 · 6 comments
Open

URI_TEMPLATE not set for pre-flight requests #189

luckyswede opened this issue Oct 6, 2020 · 6 comments
Assignees
Labels
info: good first issue Good for newcomers type: improvement A minor improvement to an existing feature

Comments

@luckyswede
Copy link

Hi!
OPTIONS-requests do not get URI_TEMPLATE set which results in an ever growing list of uri tags for http.server.request metrics and may cause OOM in the end for routes with dynamic path segments.
The reason is that URI_TEMPLATE is set in RoutingInBoundHandler which runs after the CorsFilter.

Micronaut 2.0.3

@luckyswede
Copy link
Author

My workaround for now is a micrometer MeterFilter that removes metrics with method=="OPTIONS"

@graemerocher
Copy link
Contributor

Do you have an example that reproduces the issue?

@luckyswede
Copy link
Author

@jameskleeh jameskleeh self-assigned this Oct 7, 2020
@jameskleeh
Copy link
Contributor

@luckyswede The URI_TEMPLATE is set before the filter, however the issue is that no route matches the OPTIONS request, therefore the uri template is not set because there is no route to get it from.

@jameskleeh jameskleeh transferred this issue from micronaut-projects/micronaut-core Dec 2, 2020
@jameskleeh
Copy link
Contributor

Transferred this to micrometer because I don't think we can do anything about this in core. Perhaps a config option or something can be added to ignore OPTIONS

@jameskleeh jameskleeh added info: good first issue Good for newcomers type: improvement A minor improvement to an existing feature labels Feb 2, 2022
@graemerocher
Copy link
Contributor

@n0tl3ss related issue to the previous one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info: good first issue Good for newcomers type: improvement A minor improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

4 participants