Sumo Logic

For backends with a Collector installed

Add the LogRocket session URL in a header to your API calls to backends which have Sumo Logic set up:

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

// example API call
fetch(someAPICallhere, {
  headers: { 
    // other headers
    'X-LogRocket-URL': recordingURL,
  },
});

For frontend logging without a Collector

Using the sumo-logger NPM package you can send data to a HTTP Source without installing a Collector on your server.

const SumoLogger = require('sumo-logger');

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

const logger = new SumoLogger({
  // other options
  sessionKey: recordingURL
});

// example of logging
logger.log('message');