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

Improved metrics for server grpc query #13177

Merged
merged 5 commits into from
May 22, 2024

Conversation

soumitra-st
Copy link
Contributor

@soumitra-st soumitra-st commented May 17, 2024

Added transport filter to keep track of number of gRPC connections, and added metrics to keep track of total execution times of successful and failed queries.

Added bytes sent metric in GrpcResultsBlockStreamer method - HERE

observability

@codecov-commenter
Copy link

codecov-commenter commented May 17, 2024

Codecov Report

Attention: Patch coverage is 11.11111% with 24 lines in your changes are missing coverage. Please review.

Project coverage is 62.25%. Comparing base (59551e4) to head (a0ba48d).
Report is 477 commits behind head on master.

Files Patch % Lines
...che/pinot/core/transport/grpc/GrpcQueryServer.java 0.00% 19 Missing ⚠️
.../core/transport/grpc/GrpcResultsBlockStreamer.java 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13177      +/-   ##
============================================
+ Coverage     61.75%   62.25%   +0.50%     
- Complexity      207     1294    +1087     
============================================
  Files          2436     2529      +93     
  Lines        133233   138289    +5056     
  Branches      20636    21400     +764     
============================================
+ Hits          82274    86090    +3816     
- Misses        44911    45782     +871     
- Partials       6048     6417     +369     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 62.18% <11.11%> (+0.47%) ⬆️
java-21 62.14% <11.11%> (+0.51%) ⬆️
skip-bytebuffers-false 62.22% <11.11%> (+0.48%) ⬆️
skip-bytebuffers-true 62.10% <11.11%> (+34.38%) ⬆️
temurin 62.25% <11.11%> (+0.50%) ⬆️
unittests 62.24% <11.11%> (+0.50%) ⬆️
unittests1 46.76% <11.11%> (-0.13%) ⬇️
unittests2 27.90% <0.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

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

Mostly good

private class GrpcQueryTransportFilter extends ServerTransportFilter {
@Override
public Attributes transportReady(Attributes transportAttrs) {
LOGGER.info("gRPC transportReady: REMOTE_ADDR {}",
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this potentially flood the log? Since we already have the metrics, maybe no need to log it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Proxy creates the transport when it gets the first query for a server, and does not close it, so no risk of flooding the log file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is also logging the remote address to help in troubleshooting.

@@ -162,13 +187,16 @@ public void submit(ServerRequest request, StreamObserver<ServerResponse> respons
_serverMetrics.addMeteredGlobalValue(ServerMeter.NO_TABLE_ACCESS, 1);
responseObserver.onError(
Status.NOT_FOUND.withDescription(exceptionMsg).withCause(unsupportedOperationException).asException());
return;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Request should terminate after onError, so added return.

@Jackie-Jiang Jackie-Jiang merged commit 652bb6b into apache:master May 22, 2024
19 checks passed
gortiz pushed a commit to gortiz/pinot that referenced this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants