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

refactor metrics defaultCollector&&agg #12206

Merged
merged 20 commits into from
May 2, 2023

Conversation

wxbty
Copy link
Member

@wxbty wxbty commented Apr 27, 2023

What is the purpose of the change

Use the same API as the three centers
link #11941

@wxbty
Copy link
Member Author

wxbty commented Apr 28, 2023

@AlbumenJ @songxiaosheng PTAL

@codecov-commenter
Copy link

codecov-commenter commented Apr 29, 2023

Codecov Report

Merging #12206 (af57c84) into 3.2 (830c460) will increase coverage by 0.68%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                3.2   #12206      +/-   ##
============================================
+ Coverage     68.91%   69.59%   +0.68%     
+ Complexity      341        2     -339     
============================================
  Files          3547     1598    -1949     
  Lines        162887    65629   -97258     
  Branches      26891     9573   -17318     
============================================
- Hits         112247    45674   -66573     
+ Misses        40855    15548   -25307     
+ Partials       9785     4407    -5378     

see 2017 files with indirect coverage changes

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

@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 32 Code Smells

37.9% 37.9% Coverage
0.0% 0.0% Duplication

Copy link
Member

@songxiaosheng songxiaosheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +88 to +106
public static MetricsKey getMetricsKey(RpcException e) {
MetricsKey targetKey;
targetKey = MetricsKey.METRIC_REQUESTS_FAILED;
if (e.isTimeout()) {
targetKey = MetricsKey.METRIC_REQUESTS_TIMEOUT;
}
if (e.isLimitExceed()) {
targetKey = MetricsKey.METRIC_REQUESTS_LIMIT;
}
if (e.isBiz()) {
targetKey = MetricsKey.METRIC_REQUEST_BUSINESS_FAILED;
}
if (e.isSerialization()) {
targetKey = MetricsKey.METRIC_REQUESTS_CODEC_FAILED;
}
if (e.isNetwork()) {
targetKey = MetricsKey.METRIC_REQUESTS_NETWORK_FAILED;
}
return targetKey;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the future we also cloud use map to store the relation exception to metric key

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0

@AlbumenJ AlbumenJ merged commit acd4212 into apache:3.2 May 2, 2023
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.

4 participants