Distributed Tracing with Sentry: How to Find the Root Cause of Errors Across Applications

Distributed Tracing with Sentry: How to Find the Root Cause of Errors Across Applications

Sep 23, 2019

Implementing Sentry on all your services allows you to use distributed tracing to find the root cause of errors. Just because an error happens in a browser or mobile app, doesn’t mean the issue is with the frontend or mobile code. The issue could stem from an error with code in a different project that they interact with in some way. Distributed tracing empowers developers to find the actual cause of hard to fix issues.

Here are the steps to trace a frontend error to a backend cause with Sentry:

  1. Grab the transaction or session id from the frontend error
  2. Go to the events view and search for that ID
  3. You’ll see the frontend error you copied the id from and any other errors that share that id.

To enable this feature Sentry, generate unique identifiers and set a Sentry tag in the service initiating or making the request. Set the identifier as a custom header when making requests, then extract the header on the receiving service and set as a Sentry tag.

Ready to stop digging through logs and start fixing more problems?