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

Simplify configuration when enable metrics module #2407

Closed
ev1lQuark opened this issue Aug 31, 2023 · 1 comment · Fixed by #2408
Closed

Simplify configuration when enable metrics module #2407

ev1lQuark opened this issue Aug 31, 2023 · 1 comment · Fixed by #2408

Comments

@ev1lQuark
Copy link
Contributor

There have been many changes in the Metrics module recently, try not to modify the configuration file to affect users. However, currently enabling the metrics capability on the consumer side requires modifying two places in the configuration file at the same time:

  • metrics.enable: true
  • consumer.filter: metrics

Like this:

dubbo:
  application:
    version: 3.0.1
  metrics:
    enable: true # default is true
    path: /metrics # default is /metrics
    summary-max-age: 60000000000 # 1 minute, default is 10min
    port: 9092 # default is 9090
  registries:
    demoZK:
      protocol: zookeeper
      timeout: 3s
      address: 127.0.0.1:2181
  consumer:
    references:
      GreeterClientImpl:
        group: dubbo-go
    filter: metrics

To make matters worse, the corresponding provider side does not need to display the metrics filter.

Like this:

dubbo:
  application:
    version: 3.0.1
  metrics:
    enable: true # default is true
    path: /metrics # default is /metrics
    summary-max-age: 60000000000 # 1 minute, default is 10min
    port: 9091 # default is 9090
  registries:
    myzk:
      protocol: zookeeper
      address: localhost:2181
  protocols:
    triple:
      name: tri
      port: 20000
  logger:
    zap-config:
      level: debug
  provider:
    services:
      GreeterProvider:
        group: dubbo-go

I think metrics.enable: true should be the only condition to enable or disable metrics module.

@chickenlj
Copy link
Contributor

I think metrics.enable: true should be the only condition to enable or disable metrics module.

Cannot agree more with this design. It's currently the most user friendly way to enable metrics.

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

Successfully merging a pull request may close this issue.

2 participants