-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
support metric for grpc server request #11427
support metric for grpc server request #11427
Conversation
# Conflicts: # core/src/main/java/com/alibaba/nacos/core/monitor/MetricsMonitor.java
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #11427 +/- ##
=============================================
+ Coverage 61.62% 63.89% +2.27%
- Complexity 6841 7081 +240
=============================================
Files 1066 1066
Lines 31599 31606 +7
Branches 3251 3235 -16
=============================================
+ Hits 19472 20196 +724
+ Misses 10782 10144 -638
+ Partials 1345 1266 -79
... and 81 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
# Conflicts: # core/src/main/java/com/alibaba/nacos/core/monitor/MetricsMonitor.java
@@ -176,10 +195,14 @@ public void request(Payload grpcRequest, StreamObserver<Payload> responseObserve | |||
responseObserver.onNext(payloadResponse); | |||
responseObserver.onCompleted(); | |||
}, 1000L, TimeUnit.MILLISECONDS); | |||
MetricsMonitor.recordGrpcRequestEvent(type, false, |
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.
198-199 和 204-205 是否能提取到if elae外面?看起来内容是一致的
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.
198 - 199是 OVER_THRESHOLD 的情况,请求处理是失败的,而 204 - 205是正常的。两个的参数有一个不一样
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.
你不说我都没注意到, 这个地方应该可以取到外面,因为这里其实要要穿入response.isSuccess。
现在的实现只考虑了OVER_THRESHOLD的错误吗, 其他的有错误码但是succss是true的情况
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.
done
@@ -176,10 +195,14 @@ public void request(Payload grpcRequest, StreamObserver<Payload> responseObserve | |||
responseObserver.onNext(payloadResponse); | |||
responseObserver.onCompleted(); | |||
}, 1000L, TimeUnit.MILLISECONDS); | |||
MetricsMonitor.recordGrpcRequestEvent(type, false, |
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.
你不说我都没注意到, 这个地方应该可以取到外面,因为这里其实要要穿入response.isSuccess。
现在的实现只考虑了OVER_THRESHOLD的错误吗, 其他的有错误码但是succss是true的情况
Please do not create a Pull Request without creating an issue first.
What is the purpose of the change
#10846
XXXXX
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.