Skip to main content
All CollectionsIntegrations
Sentry integration
Sentry integration
Simon avatar
Written by Simon
Updated over 10 months ago

What is Sentry?

Sentry is a bug tracking tool that helps you find issues and errors on your website. This way, it’s easier and faster to ship high-quality software. Our integration will help you improve the user experience on the website. Integrating Sentry with LiveSession is a real time-saver, as you can access all information in one place.

How does it work?

As you connect both tools, each new issue in Sentry will get a tag called sessionURL. It will redirect you to the right recording in LiveSession so you can immediately see what caused the error.

Every time a new session will start, our code will send an event to Segment with a link to session replay.

Important: Remember that LiveSession only starts recording if it detects activity of user (find out more informations about recording conditions). Because of this, Sentry will wait 3 seconds after initializing. If the user doesn’t do anything for more than 3 seconds, the sessionURL tag will be empty.

How can I install this integration?

To install integration, add the code below before your </body> closing tag:

<script type="text/javascript"> Sentry.init({ dsn: "YOUR_SENTRY_URL", beforeSend: function beforeSend(event) { var createdSessionURL = ""; __ls("getSessionURL", function (url, isNewSession) { createdSessionURL = url; }); var wait = function wait(ms) { return new Promise(function (r, j) { return setTimeout(r, ms); }); }; return wait(3000).then(() => { event.extra["sessionURL"] = createdSessionURL; return event; }); } }); Sentry.configureScope(function (scope) { scope.setExtra("sessionURL", ""); }); </script>

To make this integration works you need to have Sentry and LiveSession installed on your website. If you haven’t installed our tracking code yet check this article.

Did this answer your question?