How to correlate exception on the client and on the server?
See original GitHub issueThere’s no ActivityId
in RpcException
, so when such exception is logged it’s not easy to correlate it to traces of the request processing on the server.
Is there a way to retrieve some correlation value?
Issue Analytics
- State:
- Created 7 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Diagnose exceptions in web apps with Application Insights
You can correlate failed requests with exceptions and other events on both the client and server so that you can quickly diagnose the...
Read more >Java Client Server - Exception Handling (Thread)
I want to catch the exception on the client side. I have in mind to do the following: //Server run(){ try{ ... }...
Read more >Handling gRPC exception correctly server side
Log the exception as well as a custom message with a CorrelationId. Return an RpcException with the correct gRPC status code (depends on...
Read more >Exceptions domain
This domain contains traffic details: all of the exceptions and exception-related data. These are SQL exceptions sent from a database server and collected ......
Read more >CQRS and exception handling
In this article, I'd like to discuss one particular aspect of exception handling relevant to CQRS and the decorator pattern.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@cfox-dev , Well, I put ActivityId into trailers in server interceptor. We do not throw
RpcException
ourselves, we just let handler to process regular exception.If I got your question correctly, you can do that without interceptor. The metadata are serialized along with the RpcException so you can retrieve that when the exception is caught. Just push that value when you throw the exception at server side and then retrieve that value when you caught it at client side.