Skip to content
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

Provide a static method to enable metrics with custom name, maxConnections in ConnectionProvider #2313

Closed
tuguri8 opened this issue Jun 20, 2022 · 1 comment · Fixed by #2314
Labels
good first issue Ideal for a new contributor, we'll help help wanted We need contributions on this type/enhancement A general enhancement
Milestone

Comments

@tuguri8
Copy link
Contributor

tuguri8 commented Jun 20, 2022

Motivation

  • I found that metrics option has been added for ConnectionProvider since 0.9.5. (Add API ConnectionProvider.metrics #925)
  • To enable ConnectionProvider metrics with custom name and maxConnections now, I have to use builder and customize other options so It can make unnecessary boilerplate.
  • There are many use cases that enable only ConnectionProvider metrics with custom name, maxConnections.. so how about make new static method with name, maxConnections, metrics parameters?
    -> These can help reducing boilerplate :)

Desired solution

  • provide another create method with name, maxConnections, metrics parameters in ConnectionProvider
static ConnectionProvider create(String name, int maxConnections, boolean metrics) {
		return builder(name).maxConnections(maxConnections)
		                    .pendingAcquireTimeout(Duration.ofMillis(DEFAULT_POOL_ACQUIRE_TIMEOUT))
		                    .metrics(metrics)
		                    .build();
}

Considered alternatives

Additional context

  • If you like my idea at all, I will provide a PR. thx.
@tuguri8 tuguri8 added status/need-triage A new issue that still need to be evaluated as a whole type/enhancement A general enhancement labels Jun 20, 2022
@violetagg
Copy link
Member

@tuguri8 It will be nice if you provide a PR. Thanks!

@violetagg violetagg removed the status/need-triage A new issue that still need to be evaluated as a whole label Jun 20, 2022
@violetagg violetagg added this to the 1.0.x Backlog milestone Jun 20, 2022
@violetagg violetagg added good first issue Ideal for a new contributor, we'll help help wanted We need contributions on this labels Jun 20, 2022
tuguri8 added a commit to tuguri8/reactor-netty that referenced this issue Jun 21, 2022
@violetagg violetagg modified the milestones: 1.0.x Backlog, 1.0.21 Jun 22, 2022
tuguri8 added a commit to tuguri8/reactor-netty that referenced this issue Jun 22, 2022
tuguri8 added a commit to tuguri8/reactor-netty that referenced this issue Jun 22, 2022
tuguri8 added a commit to tuguri8/reactor-netty that referenced this issue Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Ideal for a new contributor, we'll help help wanted We need contributions on this type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants