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

feat: add grpc trailing metadata when logging grpc error #5512

Merged
merged 5 commits into from
Dec 13, 2022

Conversation

girishc13
Copy link
Contributor

@girishc13 girishc13 commented Dec 12, 2022

Add gRPC context trailing metadata when logging gRPC error message. This helps to identify the underlying network issue rather than the error codes that mask multiple network errors into a single gRPC status code.

The new log messages will look like the following.

DEBUG  gateway@ 1 GRPC call to deployment executor0 failed                      
       with error <AioRpcError of RPC that terminated with:                     
               status = StatusCode.UNAVAILABLE                                  
               details = "HTTP Balancer service in                              
       fail-fast"                                                               
               debug_error_string =                                             
       "{"created":"@1670926816.245647716","description":"E…                    
       received from peer                                                       
       ipv4:10.96.216.119:8080","file":"src/core/lib/surfac…                    
       Balancer service in fail-fast","grpc_status":14}"                        
       >                                                                        
       trailing_metadata=Metadata((('content-length', '0'),                     
       ('l5d-proxy-error', 'HTTP Balancer service in                            
       fail-fast'), ('l5d-proxy-connection', 'close'),                          
       ('date', 'Tue, 13 Dec 2022 10:20:15 GMT'))), for                         
       retry attempt 2/3. Trying next replica, if available.  

The trailing_metadata returned by the linkerd proxy or any other load balancer will help to identify the root cause more accurately.

@girishc13 girishc13 self-assigned this Dec 12, 2022
@github-actions github-actions bot added size/S area/core This issue/PR affects the core codebase area/helper This issue/PR affects the helper functionality component/client labels Dec 12, 2022
@codecov
Copy link

codecov bot commented Dec 12, 2022

Codecov Report

Merging #5512 (7b4b094) into master (f51bccf) will increase coverage by 0.68%.
The diff coverage is 92.30%.

@@            Coverage Diff             @@
##           master    #5512      +/-   ##
==========================================
+ Coverage   86.70%   87.38%   +0.68%     
==========================================
  Files         121      121              
  Lines        9618     9643      +25     
==========================================
+ Hits         8339     8427      +88     
+ Misses       1279     1216      -63     
Flag Coverage Δ
jina 87.38% <92.30%> (+0.68%) ⬆️

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

Impacted Files Coverage Δ
jina/clients/base/grpc.py 90.42% <75.00%> (-0.69%) ⬇️
jina/serve/helper.py 91.66% <92.30%> (+0.23%) ⬆️
jina/excepts.py 100.00% <100.00%> (ø)
jina/serve/networking.py 88.91% <100.00%> (+0.02%) ⬆️
jina/serve/stream/__init__.py 100.00% <100.00%> (ø)
jina/jaml/parsers/executor/legacy.py 80.76% <0.00%> (-7.70%) ⬇️
jina/serve/runtimes/worker/request_handling.py 93.53% <0.00%> (-3.02%) ⬇️
jina/orchestrate/pods/__init__.py 81.01% <0.00%> (-2.54%) ⬇️
jina/serve/runtimes/gateway/request_handling.py 93.45% <0.00%> (-1.87%) ⬇️
...ina/serve/runtimes/gateway/graph/topology_graph.py 98.96% <0.00%> (-0.52%) ⬇️
... and 10 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@github-actions github-actions bot added the area/testing This issue/PR affects testing label Dec 13, 2022
@girishc13 girishc13 marked this pull request as ready for review December 13, 2022 14:20
@JoanFM JoanFM merged commit bfe9a32 into master Dec 13, 2022
@JoanFM JoanFM deleted the feat-serve-5469 branch December 13, 2022 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core This issue/PR affects the core codebase area/helper This issue/PR affects the helper functionality area/testing This issue/PR affects testing component/client size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: improve grpc error message
2 participants