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

Reuse qos port for metrics #11719

Merged
merged 20 commits into from
Mar 13, 2023
Merged

Reuse qos port for metrics #11719

merged 20 commits into from
Mar 13, 2023

Conversation

wxbty
Copy link
Member

@wxbty wxbty commented Mar 3, 2023

What is the purpose of the change

Issue Number: close #11649

Brief changelog

  1. The one-time created metricsReporter needs to be registered to beanFactory, so that the BaseCommand spi implementation of qos can obtain.
  2. exportHttpServer is no longer required
  3. The metrics report is at the application level, so the PrometheusMetricsReporterCmd at the frame level needs to traverse the AppModel, and then obtain the corresponding beanFactory implementations.
  4. Http path of qos needs to be modified to support two-level paths, such as xxx:22222/metrics/app1

@songxiaosheng
Copy link
Member

Whether it is possible to optimize the code that the response results are printed to the log. The indicator results will be printed to the log more often,
The DefaultCommandExecutor will print all the indicator results to the log file (where the indicator content is too long, the log result can be filtered or shortened in another way)

是否可以优化下响应结果打印到日志的那段代码,指标结果打印到日志里面会比较多,
DefaultCommandExecutor中会将指标结果全部打印到日志文件中(指标内容太长了log result的地方可以过滤或者换种日志打印方式缩短下)

image

@wxbty
Copy link
Member Author

wxbty commented Mar 8, 2023

Whether it is possible to optimize the code that the response results are printed to the log. The indicator results will be printed to the log more often, The DefaultCommandExecutor will print all the indicator results to the log file (where the indicator content is too long, the log result can be filtered or shortened in another way)

是否可以优化下响应结果打印到日志的那段代码,指标结果打印到日志里面会比较多, DefaultCommandExecutor中会将指标结果全部打印到日志文件中(指标内容太长了log result的地方可以过滤或者换种日志打印方式缩短下)

image

Added the option not to print

@songxiaosheng
Copy link
Member

please add Metrics request permission to public

@wxbty wxbty requested review from AlbumenJ March 9, 2023 01:42
@wxbty
Copy link
Member Author

wxbty commented Mar 9, 2023

please add Metrics request permission to public

done

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

5.7% 5.7% Coverage
0.0% 0.0% Duplication

@codecov-commenter
Copy link

Codecov Report

Merging #11719 (e81a0fa) into 3.2 (31635d5) will decrease coverage by 0.56%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                3.2   #11719      +/-   ##
============================================
- Coverage     69.36%   68.81%   -0.56%     
+ Complexity      341        2     -339     
============================================
  Files          3256     1533    -1723     
  Lines        153186    63545   -89641     
  Branches      25583     9308   -16275     
============================================
- Hits         106261    43728   -62533     
+ Misses        37529    15564   -21965     
+ Partials       9396     4253    -5143     

see 1748 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@AlbumenJ AlbumenJ merged commit 9ea6094 into apache:3.2 Mar 13, 2023
mytang0 added a commit to mytang0/dubbo that referenced this pull request Mar 14, 2023
* origin/3.2: (25 commits)
  Bump bytebuddy.version from 1.14.1 to 1.14.2 (apache#11814)
  Dynamically generate native image config (apache#11795)
  Remove redundant synchronized (apache#11811)
  fix remove unused param (apache#11787)
  Bump bytebuddy.version from 1.14.0 to 1.14.1 (apache#11808)
  Reuse qos port for metrics (apache#11719)
  🐛 fix thread pool metrics be gc recycle problem (apache#11793)
  Bump protobuf-java from 3.22.0 to 3.22.2 (apache#11802)
  Bump spring-security-bom from 5.8.1 to 5.8.2 (apache#11801)
  Bump byte-buddy from 1.14.0 to 1.14.1 (apache#11804)
  Cert npe bug fix (apache#11800)
  Fix uts
  Fix lock acquire blocked
  Fix hessian list
  Fix metrics publisher NPE
  Fix ut
  Fix bug apache#11767 (apache#11781)
  Fix uts
  Sync when destroy (apache#11783)
  Fix recreate client after destroy (apache#11780)
  ...
mytang0 added a commit to mytang0/dubbo that referenced this pull request Mar 14, 2023
* origin/3.2: (28 commits)
  Bump bytebuddy.version from 1.14.1 to 1.14.2 (apache#11814)
  Dynamically generate native image config (apache#11795)
  Remove redundant synchronized (apache#11811)
  fix remove unused param (apache#11787)
  Bump bytebuddy.version from 1.14.0 to 1.14.1 (apache#11808)
  Reuse qos port for metrics (apache#11719)
  🐛 fix thread pool metrics be gc recycle problem (apache#11793)
  Bump protobuf-java from 3.22.0 to 3.22.2 (apache#11802)
  Bump spring-security-bom from 5.8.1 to 5.8.2 (apache#11801)
  Bump byte-buddy from 1.14.0 to 1.14.1 (apache#11804)
  Cert npe bug fix (apache#11800)
  Fix uts
  Fix lock acquire blocked
  Fix hessian list
  Fix metrics publisher NPE
  Fix ut
  Fix bug apache#11767 (apache#11781)
  Fix uts
  Sync when destroy (apache#11783)
  Fix recreate client after destroy (apache#11780)
  ...
lcb11 pushed a commit to lcb11/dubbo that referenced this pull request Mar 31, 2023
* init

* init

* reuse qos port for metrics

* reuse qos port for metrics

* fix

* fix

* add logResult

* allow all&&use exist

* remove unuse

* fix testcase

* fix testcase

* public permission level

* revert permission level

* fix

---------

Co-authored-by: x-shadow-man <1494445739@qq.com>
Co-authored-by: Albumen Kevin <jhq0812@gmail.com>
@wxbty wxbty deleted the reuse-port branch March 31, 2023 14:10
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 this pull request may close these issues.

Observability task: Reuse Meter port to QOS port
4 participants