Comment on page
Sumo Logic
Use Zipy session URLs with Sumo Logic logs for efficient troubleshooting.
Make sure you have the Sumo Logic Logger package installed in your application. You can typically install it using a package manager like npm or yarn. Import the SumoLogger module and the Zipy session URL retrieval code into your logging module or file.
const SumoLogger = require('sumo-logger');
const zipySessionUrl = window.zipy.getCurrentSessionURL();
Create an instance of the SumoLogger class, passing the necessary options as an object. In this case, include the
sessionKey
option and set it to the Zipy session URL retrieved in Step 1.const logger = new SumoLogger({
// other options
sessionKey: zipySessionUrl
});
You can now use the logger instance to log custom messages. The logs will automatically include the Zipy session URL, making it easier to trace the logs back to specific user sessions.
// Example of logging a message
logger.log('message');
Open the Sumo Logic web interface and navigate to the collector logs for your application. You should see the Zipy session URL included as part of the logged messages.

Last modified 5mo ago