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
Mutable NewConnectionProvider #3149
Comments
@dimitaracev Can you please elaborate more? What kind of statistics do you need? Currently |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
@violetagg Thanks for the response and sorry for the late reply. I basically just need to enable the metrics for the Please let me know if this not understandable enough but in short, I just need to enable the default metrics for a |
@dimitaracev Looking at these |
Yes, that would be enough. I just mainly need to keep track of the active connections. |
Then why don't you use |
I guess that would work but would still defer from the |
ok keep me posted for the results |
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open. |
Motivation
On a project that I'm currently working on, we need to export metrics to Prometheus and this is easily done for the
PooledConnectionProvider
through theConnectionProvider.builder(..).metrics(true)
. We also use aNewConnectionProvider
in certain situations where we always require new connections so no connection gets reused from the pool. Instantiating aConnectionProvider
through theConnectionProvider.newConnection()
method returns aNewConnectionProvider
but unfortunately that implementation does not override theConnectionProvider#mutate()
method and instead returns the defaultnull
value. This means that there is no way to add metrics to this type ofConnectionProvider
.Desired solution
To be able to add metrics to a
NewConnectionProvider
, and themutate
method seems like a solution.Considered alternatives
Creating our own
NewConnectionProvider
with amutate
method implemented, based on the one provided by Netty.Additional context
Note: Happy to create a PR for this.
The text was updated successfully, but these errors were encountered: