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 way to customize meters #5665

Open
ikhoon opened this issue May 7, 2024 · 0 comments
Open

Provide a way to customize meters #5665

ikhoon opened this issue May 7, 2024 · 0 comments

Comments

@ikhoon
Copy link
Contributor

ikhoon commented May 7, 2024

One DistributionStatisticConfig is shared to configure both Timer and DistributionSummary.
This limitation prevents users from being able to customize Armeria meters with various options.
Users may want to configure different configurations for request.duration and request.length.

Proposal: Provide an API that creates a new Timer or DistributionSummary.

interface MeterFactory {
  Timer newTimer(MeterRegistry registry, String name, Iterable<Tag> tags);

  DistributionSummary newDistributionSummary(MeterRegistry registry,
                                             String name, Iterable<Tag> tags);

  ...
}

In addition to MetricCollecting{Service,Client}, meters are wildly used in Armeria internally, ServerBuilder and ClientFactoryBulder would be proper locations to set.

Server
  .builder()
  .meterFactory(myMeterFactory)

ClientFactory
  .builder()
  .meterFactory(myMeterFactory)

#5661 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant