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
Deregister connection pool metrics from Micrometer
(or alternate registry) when disposing the connection pool
#2608
Conversation
…der to release resources when there is a large churn of connection pools and endpoints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manolama Thanks for the PR!
I have several comments.
Also I want to add the link below for completeness
https://micrometer.io/docs/concepts#_why_is_my_gauge_reporting_nan_or_disappearing
Once Reactor Netty disposes a connection pool there is no strong reference anymore, so NaN is expected to be returned by the Gauges.
reactor-netty-core/src/main/java/reactor/netty/resources/ConnectionProvider.java
Outdated
Show resolved
Hide resolved
reactor-netty-core/src/test/java/reactor/netty/resources/ConnectionProviderTest.java
Outdated
Show resolved
Hide resolved
...ty-core/src/test/java/reactor/netty/resources/PooledConnectionProviderCustomMetricsTest.java
Outdated
Show resolved
Hide resolved
...ty-core/src/test/java/reactor/netty/resources/PooledConnectionProviderCustomMetricsTest.java
Outdated
Show resolved
Hide resolved
...ty-core/src/test/java/reactor/netty/resources/PooledConnectionProviderCustomMetricsTest.java
Outdated
Show resolved
Hide resolved
...ty-core/src/test/java/reactor/netty/resources/PooledConnectionProviderCustomMetricsTest.java
Outdated
Show resolved
Hide resolved
...ty-core/src/test/java/reactor/netty/resources/PooledConnectionProviderCustomMetricsTest.java
Outdated
Show resolved
Hide resolved
...ty-core/src/test/java/reactor/netty/resources/PooledConnectionProviderCustomMetricsTest.java
Outdated
Show resolved
Hide resolved
...src/main/java/reactor/netty/http/client/MicrometerHttp2ConnectionProviderMeterRegistrar.java
Show resolved
Hide resolved
...ty-core/src/test/java/reactor/netty/resources/PooledConnectionProviderCustomMetricsTest.java
Outdated
Show resolved
Hide resolved
…void interface changes for now. Remove unecessary Connection return from the unit metrics unit test. Thanks @violetagg
Thanks!
Context for the PR (from internal chats): |
…tration of the pool metrics after disposal.
@reactor/netty-team PTAL the failing tests on Windows OS are not related |
reactor-netty-core/src/test/java/reactor/netty/resources/ConnectionProviderTest.java
Outdated
Show resolved
Hide resolved
The change is already available via #2608
@manolama I back ported this change to 1.0.x for 1.0.26 |
Micrometer
(or alternate registry) when disposing the connection pool
Deregister pool metrics from Micrometer (or alternate registry) in order to release resources when there is a large churn of connection pools and endpoints.