Skip to content

MetricsFilter may create an unbounded number of metrics for requests with a templated URI that are not handled by Spring MVC #5875

Closed
@heroicefforts

Description

@heroicefforts

The MetricsFilter is unsuitable for REST microservices that are backing a large number of entities. In our case, it was trying to generate gauges and counters for /widget/1 to /widget/60000000. It eventually soaks the heap and causes the server to slow to a crawl as it spends most of its CPU cycles in GC. There should be a big red "caveat" bubble in the documentation that details this scenario.

Ideally, a Spring MVC controller metrics controller should be implemented that works similar to the DropWizard Jersey 2 implementation (plus some RequestMapping introspection), then the MetricsFilter could be disabled by default.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions