Sentry Destination

Sentry is open-source error tracking that helps developers monitor and fix crashes in real time. Iterate continuously. Boost efficiency. Improve user experience. The analytics.js Sentry Destination is open-source. You can browse the code on GitHub.

This document was last updated on October 16, 2018. If you notice any gaps, outdated information or simply want to leave some feedback to help us improve our documentation, please let us know!

Getting Started

The first step is to make sure Sentry supports the source type and connection mode you’ve chosen to implement. You can learn more about what dictates the connection modes we support here.

📱 Device-based
☁️ Cloud-based
  1. From your Segment UI’s Destinations page click on “Add Destination”.
  2. Search for “Sentry” within the Destinations Catalog and confirm the Source you’d like to connect to.
  3. Drop in your “Public DSN” into the Sentry destination settings.
  4. We’ll automatically initialize Sentry with your “Public DSN” upon loading analytics.js.
  5. Sentry will automatically start tracking errors in your app’s javascript.


If you haven’t had a chance to review our spec, please take a look to understand what the Identify method does. An example call would look like:


When you call identify we call Raven.setUserContext by passing in the traits you provided. We will map the userId you provide as

Questions? Need help? Contact us!
Can we improve this doc?
Email us:!