Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to correlate exception on the client and on the server?

See original GitHub issue

There’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:closed
  • Created 7 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

voroninpcommented, Feb 8, 2023

@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.

cfox-devcommented, Feb 8, 2023

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found