Sentry
Integrating LogRocket with Sentry
Add a LogRocket session recording URL to every Sentry exception report.
Sentry.configureScope(scope => {
scope.setExtra("sessionURL", LogRocket.sessionURL);
});
LogRocket.sessionURL
returns null
in cases where the LogRocket SDK hasn't fully initialized and begun sending session data back to LogRocket servers. To guarantee the presence of a session URL, pass a callback to LogRocket.getSessionURL()
.
LogRocket.getSessionURL(sessionURL => {
Sentry.configureScope(scope => {
scope.setExtra("sessionURL", sessionURL);
});
});
If you're using the legacy Raven SDK:
Raven.setDataCallback(data => {
data.extra.sessionURL = LogRocket.sessionURL;
return data;
});
Updated over 5 years ago