Distributed Tracing with Sentry: How to Find the Root Cause of Errors Across Applications
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:
- Grab the transaction or session id from the frontend error
- Go to the events view and search for that ID
- 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?