Skip to content

Clarify documentation on disabling web client request metrics #32136

Closed
@NihalGoel

Description

@NihalGoel

Spring Boot configures http clients (resttemplate & webclient) by default to gather metrics using micrometer.

We use the property management.metrics.enable.http.client.requests to disable http client request metrics by default but under the hood micrometer Meter.Id instances are still being created for every permutation of tags measured.

Given enough permutations this can create something close to a memoryleak as it will create (and cache) all these Meter.Ids and cause severe pressure on GC or even apps dying due to an OOME.

as a workaround we can set management.metrics.web.client.request.autotime.enabled to false but I would expect this to be disabled automatically when http client request metrics are disabled.

This is on Spring boot 2.7.3

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions