Sentry Destination

Segment makes it easy to send your data to Sentry (and lots of other destinations). Once you've tracked your data through our open source libraries we'll translate and route your data to Sentry in the format they understand. Learn more about how to use Sentry with Segment.

Our Sentry destination code is all open-source on GitHub if you want to check it out.

Getting Started

When you toggle on Sentry in Segment, this is what happens:

  • Our CDN is updated within 5-10 minutes. Then our snippet will start asynchronously loading Sentry’s javascript onto your page. This means you should remove Sentry’s snippet from your page.
  • Sentry will automatically start tracking errors in your app’s javascript.

Sentry is only supported on the client-side.


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

Supported Sources and Connection Modes

📱 Device-based
☁️ Cloud-based

To learn more about about Connection Modes and what dictates which we support, see here.


Segment lets you change these destination settings via your Segment dashboard without having to touch any code.

Public DSN

You can find your Public DSN by going to Sentry and clicking Projects & Teams > Any Project > Settings > Client Keys (DSN). This should be the PUBLIC DSN since it does not contain a secret.

Set Release by Property

Dynamically track the version of your application in Sentry. If the property you set here is on the global window object (example: you input ‘my_custom_version’, and window.my_custom_version = ‘2.4.5’) then we will use that version. If not, we will default to the manually-set Release property. We recommend that this value is unique to prevent it from being overwritten by other integrations.

Ignore Errors

A list of these messages to be filtered out before being sent to Sentry as either regular expressions or strings.

Ignore Urls

The inverse of whitelistUrls and similar to ignoreErrors, but will ignore errors from whole urls matching a regex pattern or an exact string.

Include Paths

An array of regex patterns to indicate which urls are a part of your app in the stack trace. All other frames will appear collapsed inside Sentry to make it easier to discern between frames that happened in your code vs other code. It’d be suggested to add the current page url, and the host for your CDN.


The name of the logger used by Sentry.

Maximum Message Length

By default, Raven does not truncate messages. If you need to truncate characters for whatever reason, you may set this to limit the length.


Track the version of your application in Sentry.

Server Name

Typically this would be the server name, but that doesn’t exist on all platforms. Instead you may use something like the device ID, as it indicates the host which the client is running on.

Whitelist Urls

The inverse of ignoreUrls. Only report errors from whole urls matching a regex pattern or an exact string. whitelistUrls should match the url of your actual JavaScript files. It should match the url of your site if and only if you are inlining code inside