Rollbar

Rollbar is an error tracking tool that helps developers discover and resolve crashes and errors.

Integrating Rollbar with Cortex allows you to:

How to configure Rollbar with Cortex

Prerequisites

Before getting started:

  • Create a Rollbar access token.

    • The token requires read permissions at minimum. This allows Cortex to automatically look up project tokens for each Rollbar project and attempt to reuse them to access project details.

    • Granting the token read and write permissions enables Cortex to automatically create an access token if none exists for a given project.

Configure the integration in Cortex

  1. In Cortex, navigate to the Rollbar settings page:

    1. In Cortex, click your avatar in the lower left corner, then click Settings.

    2. Under "Integrations," click Rollbar.

  2. Click Add configuration.

  3. Configure the integration form:

    • Account access token: Enter the access token you generated in Rollbar.

    • Account name: Enter your Rollbar account name, found in your Rollbar settings.

      • The name also appears in the URL for your Rollbar instance, e.g.,

  4. Click Save.

After saving your configuration, you are redirected to the Rollbar integration settings page in Cortex. In the upper right corner of the page, click Test configuration to ensure Rollbar was configured properly.

How to connect Cortex entities to Rollbar projects

Discovery

By default, Cortex will use the entity tag (e.g. my-entity) as the "best guess" for Rollbar projects. For example, if your entity tag is my-entity, then the corresponding project in Rollbar should also be my-entity.

If your Rollbar projects don’t cleanly match the Cortex entity tag, you can override this in the Cortex entity descriptor.

Editing the entity descriptor

You can define projects under the x-cortex-rollbar block in an entity's YAML:

x-cortex-rollbar:
  project: my-project
Field
Description
Required

project

Project name as defined in Rollbar

Using the Rollbar integration

Viewing Rollbar errors on an entity

Error data from Rollbar will appear on an entity's details page. In an entity's sidebar, click Error tracking to view detected issues for each Rollbar project. At the top of the page, see the associated project tag and the project framework.

Under Items, see a list of detected errors and their statuses. Next to the error name, you can also see badges for # seen and the type of event: error, warning, or info.

Scorecards and CQL

With the Rollbar integration, you can create Scorecard rules and write CQL queries based on Rollbar projects.

See more examples in the CQL Explorer in Cortex.

Check if Rollbar project is set

Check if entity has a registered Rollbar project.

Definition: rollbar (==/!=) null

Example

You can define a rule in an operational readiness Scorecard to make sure each entity has a registered Rollbar project.

rollbar != null

This is also a good way to confirm the integration is synced and reporting frequently.

You could also query for entities that don't have a registered Rollbar project to quickly identify those that need to be updated:

rollbar == null
RQL query

Evaluate an RQL query for the Rollbar project.

If the entity does not have a Rollbar project set, the rule will fail. An empty result set will result in null.

Definition: rollbar.rql(<query>)

Example

An operational maturity Scorecard, you can use this expression to make sure entities have fewer than 100 open errors.

rollbar.rql("SELECT count(*) FROM item_occurrence WHERE status = 1") < 100

Or you can set a rule that gauges errors over time:

rollbar.rql("SELECT count(*) / 30 FROM item_occurrence WHERE timestamp > unix_timestamp() - 60 * 60 * 24 * 30") < 5

This rule checks that entities have fewer than 5 new errors per day on average over the last 30 days.

Still need help?

The following options are available to get assistance from the Cortex Customer Engineering team:

  • Email: [email protected], or open a support ticket in the in app Resource Center

  • Chat: Available in the Resource Center

  • Slack: Users with a connected Slack channel will have a workflow added to their account. From here, you can either @CortexTechnicalSupport or add a :ticket: reaction to a question in Slack, and the team will respond directly.

Don’t have a Slack channel? Talk with your Customer Success Manager.

Last updated

Was this helpful?