# Rollbar Destination

## Destination Info

* Accepts [Identify](/docs/segment/connections/spec/identify) calls.
* Refer to it as **Rollbar** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)

### Components

* [Browser](https://github.com/segment-integrations/analytics.js-integration-rollbar)

## Connection Modes

[Learn more about connection modes.](/docs/segment/connections/destinations/#connection-modes)

### Device-Mode

* web: yes
* mobile: no
* server: no

### Cloud-Mode

* web: no
* mobile: no
* server: no

## Getting Started

When you enable Rollbar in Segment, we'll start sending data to the Rollbar API for your account. Currently, Rollbar will send data from our analytics.js library.

To start pushing user data to Rollbar, toggle the destination on and add your Rollbar access token. Your access token can be found in your Rollbar Settings > Access Tokens.

## Identify

The first thing you'll want to do is to [`identify`](/docs/segment/connections/spec/identify/) a user with any relevant information as soon as they log-in, or sign-up. You record this with our [`identify`](/docs/segment/connections/spec/identify/) method.

## Enabling Source Maps

This feature makes use of JavaScript Source Maps to translate the minified code references back into the original source. To use this feature in Rollbar, be sure to do the following:

1. Enable source maps and fill out the Code Version in your [Rollbar settings](/docs/segment/connections/destinations/catalog/rollbar/#settings) in the Segment UI.
2. Provide your source map. There are two ways you can do this:

   1. Automatic download: place a comment like the following at the bottom of your minified JavaScript files:

   ```text
   //# sourceMappingURL=URL_TO_SOURCE_MAP
   ```

   2. Upload pre-deploy: at the beginning of your deploy script, upload a source map package using Rollbar's API.

For more detail on providing your source map, checkout [Rollbar's documentation here](https://rollbar.com/docs/source-maps/#step-2-provide-your-source-map).

## Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

| Field                                                  | Description                                                                                                                                                                                                                                                                                                                                                 | Required | Type    |
| ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
| Access Token                                           | Your Rollbar access token                                                                                                                                                                                                                                                                                                                                   | Yes      | string  |
| Capture uncaught exceptions                            | Record uncaught exceptions from \`window.onerror\`.                                                                                                                                                                                                                                                                                                         | No       | boolean |
| Capture Unhandled Rejections                           | Catch and report unhandled Promise rejections, such as Promise failures that do not have a corresponding \`.then(null, function(e) \{})\` handler.                                                                                                                                                                                                          | No       | boolean |
| Code Version                                           | If you have enabled Source Maps, this is a version string, such as a version number or git sha                                                                                                                                                                                                                                                              | No       | string  |
| Environment                                            | The environment the code is running in.                                                                                                                                                                                                                                                                                                                     | No       | string  |
| Guess Uncaught Frames                                  | When this option is enabled, Rollbar will guess which frames the error was thrown from when the browser does not provide line and column numbers.                                                                                                                                                                                                           | No       | boolean |
| Include custom user data with Rollbar's error tracking | When this option is enabled we will store metadata about the user on \`identify\` calls.                                                                                                                                                                                                                                                                    | No       | boolean |
| Ignored Messages                                       | If you want to ignore a specific exception message, say for a third-party browser plugin that is throwing errors, you can add them here and Rollbar will ignore exceptions matching those messages.                                                                                                                                                         | No       | array   |
| Enable Source Map                                      | When this option is enabled, we'll let Rollbar know you have source maps enabled. Be sure to implement either Option A or B in \[these instructions]\(https://rollbar.com/docs/source-maps/#step-2-provide-your-source-map) to set up source maps with Rollbar as well as fill out Code Version in you Rollbar Integration settings in your Segment source. | No       | boolean |
