Rollbar
Unlock advanced error insights in Rollbar with Zipy session URLs for contextual debugging and efficient issue resolution.
Add a Zipy session URL to every Rollbar exception report.
const zipySessionUrl = window.zipy.getCurrentSessionURL();
Rollbar.configure({
transform: function (obj) {
obj.sessionURL = zipySessionUrl;
},
});
This code configures Rollbar to transform the error payload before sending it to the Rollbar server. The transform function specified in the configuration adds a new property
sessionURL
to the error payload and sets its value to the zipySessionUrl
variable.When Rollbar detects an error, it captures information about the error, such as the error message, stack trace, and environment details, and sends it to the Rollbar server for analysis and reporting. The
transform
configuration option allows you to modify the error payload before it is sent to the server.In this example, the
transform
function is adding a new property sessionURL
to the error payload. This could be useful for associating errors with specific user sessions or other contextual information that is not captured by default. By adding a custom property like sessionURL
to the error payload, you can make it easier to track down and diagnose errors that are specific to certain user sessions or contexts.Last modified 3mo ago