-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
Conversation
…nto default-refactor
@AlbumenJ @songxiaosheng PTAL |
Codecov Report
@@ 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 |
Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0
What is the purpose of the change
Use the same API as the three centers
link #11941