Backend Error Reproduction

Tracing backend errors to the user sessions that caused them.

When backend requests cause exceptions or fail, it's often helpful to see how the user arrived at the buggy application state.

Integrating LogRocket with backend logging tools lets you see the corresponding LogRocket session for every backend network log. The simplest way to do this is to add an extra header to network requests like this:

var recordingURL;
LogRocket.getSessionURL(function(sessionURL) {
  recordingURL = sessionURL;

fetch(API, {
  headers: { 
    // other headers
    'X-LogRocket-URL': recordingURL,

Then, when you view logs or backend errors, you can inspect the headers to get a link directly to the LogRocket session to see what on the frontend triggered the backend issue:

Read more about the data that LogRocket collects to help you reproduce backend bugs.