LogoLogo
Login to CortexBook a DemoCortex Academycortex.io
  • Cortex Docs
  • Cortex Quick Start
  • Ingesting data into Cortex
    • Managing Entities
      • Adding entities
        • Add services
        • Add domains
        • Add teams
        • Add custom entity types
        • Defining dependencies
      • Entity details page
      • Defining ownership
      • Defining relationship types
      • Grouping entities
      • Adding external documentation
      • Adding Deploy data
      • Adding custom data
      • Viewing discovered entities
      • Archiving entities
      • Relationship graph
      • Using On-call Assistant for incidents
      • Managing Terraform infra in Cortex
    • Managing Catalogs
    • Integrations
      • Internally hosted integrations
      • ArgoCD
      • AWS
      • Azure DevOps
      • Azure Resources
      • BambooHR
      • Bitbucket
      • BugSnag
      • Buildkite
      • Checkmarx
      • CircleCI
      • ClickUp
      • Codecov
      • Coralogix
      • Custom webhook integrations
      • Datadog
      • Dynatrace
      • Entra ID (Azure AD)
      • FireHydrant
      • GitHub
      • GitLab
      • Google
      • Grafana
      • incident.io
      • Instana
      • Jenkins
      • Jira
      • Kubernetes
      • LaunchDarkly
      • Lightstep
      • Mend
      • Microsoft Teams
      • New Relic
      • Okta
      • Opsgenie
      • PagerDuty
      • Prometheus
      • Rollbar
      • Rootly
      • Sentry
      • ServiceNow
      • Slack
      • Snyk
      • SonarQube
      • Splunk Observability Cloud (SignalFx)
      • Splunk On-Call (VictorOps)
      • Sumo Logic
      • Veracode
      • Wiz
      • Workday
      • xMatters
  • Scorecards
    • Initiatives and Action items
      • Creating issues based on Initiatives
    • Scorecard rule exemptions
    • Scorecard rule filters
    • Scorecard examples
    • Scorecards as code
  • Reports
    • Executive report
    • All Scorecards report
    • Bird's eye report
    • Progress report
    • Report card
  • Eng Intelligence
    • Custom Metrics
    • Jira Metrics
    • Metrics Explorer (Beta)
  • Cortex Query Language (CQL)
    • Using CQL reports
    • Using JQ in Cortex
  • Workflows
    • Creating a Workflow
      • Workflows as code
    • Blocks
    • Running a Workflow
    • Registering a Scaffolder template
      • Scaffolder advanced usage
    • Using a Workflow to sync in ArgoCD
    • Kicking off a Jenkins pipeline in a Workflow
    • Calling internal service endpoints in a Workflow
  • Plugins
    • Creating a plugin
      • Creating a plugin proxy
    • Migrating Backstage plugins to Cortex
  • Engineering homepage
  • Workspace Settings
    • Using GitOps for Cortex
      • GitOps logs
    • Managing users
      • Roles and permissions
        • Custom roles
        • Team ownership entity editing
      • Configuring SSO
        • Microsoft Entra ID
        • Google
        • Other OIDC providers
        • Okta
          • Okta SCIM
      • Configuring identity mappings
      • Onboarding management
    • API keys, secrets, and tokens
      • Secrets
      • Personal tokens
    • Audit logs
    • Entity settings
      • Data verification
      • Auto archiving entities
    • IP allowlist
    • Notifications
      • Notification logs
    • Customizing your workspace
    • Using search in Cortex
  • Cortex API
    • REST API operations
      • API Keys
      • Audit Logs
      • Catalog Entities
      • Custom Data
        • Custom Data (Advanced)
      • Custom Events
      • Custom Metrics
      • Dependencies
      • Deploys
      • Discovery Audit
      • Docs
      • Eng Intel: User Labels
      • Entity Relationship Types (Beta)
      • Entity Relationships (Beta)
      • Entity Types
      • GitOps Logs
      • Groups
      • Initiatives
      • Integrations APIs
        • Azure Active Directory (Entra ID) API
        • Azure Resources API
        • AWS API
        • Azure DevOps API
        • CircleCI API
        • Coralogix API
        • Datadog API
        • GitHub API
        • GitLab API
        • incident.io API
        • LaunchDarkly API
        • New Relic API
        • PagerDuty API
        • Prometheus API
        • SonarQube API
      • IP Allowlist
      • Notification Logs
      • On call
      • Packages
      • Plugins
      • Queries
      • SCIM
      • Scorecards
      • Secrets
      • Team Hierarchies
      • Teams
      • Workflows
Powered by GitBook
On this page
  • How to configure Sentry with Cortex
  • Prerequisites
  • Configure the integration in Cortex
  • How to connect Cortex entities to Sentry projects
  • Discovery
  • Editing the entity descriptor
  • Using the Sentry integration
  • Viewing Sentry errors on an entity
  • Using the Cortex Slack Bot with Sentry
  • Scorecards and CQL
  • Still need help?​

Was this helpful?

Export as PDF
  1. Ingesting data into Cortex
  2. Integrations

Sentry

Last updated 10 days ago

Was this helpful?

is an application monitoring platform that helps developers identify, debug, and resolve issues.

Integrating Sentry with Cortex allows you to:

  • , giving you insight into your entity's operational maturity

  • , using the Cortex Slack Bot

  • Create that include rules related to Sentry errors

How to configure Sentry with Cortex

Prerequisites

Before getting started:

  • Create a in your Sentry user settings.

    • The user auth token requires Read for the Issue & Event and Project scopes.

Configure the integration in Cortex

  1. In Cortex, navigate to the :

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

    2. Under "Integrations," click Sentry.

  2. Click Add configuration.

  3. Configure the integration form:

    • Auth token: Enter the auth token you generated in Sentry.

    • Organization slug: Enter your Sentry organization slug.

      • You can find this in your Sentry URL, e.g., https://sentry.io/organizations/{SLUG}/issues/.

    • Host: If using a self-hosted Sentry instance, enter the URL here without the API path (e.g., bugsnag.getcortexapp.com).

  4. Click Save.

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

How to connect Cortex entities to Sentry projects

Discovery

If your Sentry 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-sentry block:

x-cortex-sentry:
  projects:
  - name: my-project
  - name: my-second-project
Field
Description
Required

name

Project name as defined in Sentry

✓

Using the Sentry integration

Viewing Sentry errors on an entity

Events

Sentry issues and events will also appear in an entity's event timeline, found under Events in the sidebar. This allows users to contextualize Sentry issues with other key data - like deploys or errors discovered from other integrations - during incidents or migrations.

Using the Cortex Slack Bot with Sentry

Scorecards and CQL

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

Check if Sentry project is set

Check if entity has a registered Sentry project.

Definition: sentry (==/!=) null

Example

For a production readiness Scorecard, you can use this expression to make sure entities are linked to a Sentry project.

sentry != null

This can also serve as a way to confirm that entities are synced with Sentry and reporting frequently.

Number of events

If no query is provided, the rule will count unresolved events by default.

Definition: sentry.numOfIssueEvents((<query>))

Example

For a Scorecard focused on operational maturity, you can check for any unresolved issues that were first seen within a week.

sentry.numOfIssueEvents("is:unresolved firstSeen:-1w") <= 10
Number of issues

Counts Sentry issues for a given custom query to a max of 300.

If no query is provided, the rule will count unresolved issues by default.

Definition: sentry.numOfIssues((<query>))

Example

For a Scorecard focused on operational maturity, you can pull in the number of Sentry issues to make sure entities are functioning as expected.

sentry.numOfIssues() < 100

For a Scorecard focused on code quality, you can write a more focused rule to make sure there haven't been any issues in production environments in the last week.

sentry.numOfIssues("is:unresolved environment:[production,prod] lastSeen:-1w") < 2

The maximum number of Sentry events fetched for any query is 1,000, while the maximum number of issues fetched is 300.

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

  • 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.

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

Error data will appear on an entity's details page. In an entity's sidebar, click Error tracking to view detected issues for each Sentry project. At the top of the page, see a list of Sentry projects associated with an entity. Each project listed in Cortex links back to the .

Under the Issues header on the Error tracking page, you'll find a list of all issues related to the projects that Cortex detected in Sentry. Each issue in the list links back to that . Cortex will pull in the title and tags for each issue.

If you have also configured the , you can use the command /cortex sentry <tag> in to get a list of all recent Sentry issues for a given entity. tag is the in Cortex.

See more examples in the in Cortex.

Counts Sentry events for a given to a max of 1,000.

Still need help?

Email: , or open a support ticket in the in app Resource Center

project details page in Sentry
issue's details page in Sentry
CQL Explorer
custom query
​
help@cortex.io
Sentry
Sentry user auth token
permissions
Sentry settings page
View errors on entity pages in Cortex
Pull a list of recent Sentry issues directly in Slack
Scorecards
Slack integration
Slack
entity tag
entity tag