Skip to content

MeterRegistry implementations are not stopped when the context is closed. #12006

@wilkinsona

Description

@wilkinsona

Many of them have a stop method but it isn't called when the context is closed. As a result the registry doesn't tidy up its resources. For example, the Ganglia exporter leaks threads. This is apparent in our tests for the auto-configuration, but it will also affect apps where the lifecycle of an application context that's using Micrometer isn't the same as the lifecycle of the JVM.

I think we need to configure stop as a custom destroy method.

/cc @jkschneider

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions