Using Sentry on Enterprise and Business Plans

videoWebinarBest Practices

This guide assumes you’ve already integrated Sentry’s SDK into your code and sent an event. The list below provides Sentry’s recommendations for how best to use Sentry after you’ve taken your first steps.

First 30 Days: Getting started

Once you’ve integrated Sentry’s SDK, follow these best practices to customize your Sentry configuration and optimize your notification workflows.

Get organized with Teams and Projects

Teams and Projects have a many-to-many relationship in Sentry.

We recommend creating Teams that align with your internal team structure. For example, every Sentry engineer uses Sentry. Because we have different teams of engineers responsible for different parts of our product, the Teams need to be named appropriately, like #SDK and #ops.

There’s no right or wrong way to separate your Sentry Projects, we recommend creating projects to align with the different services within your organization. Here are some important things to remember when determining project differentiation:

  • Use environments as a top-level filter.
  • Generate multiple DSN Keys per project via the API or in Sentry’s UI under Project Settings (Project Settings > Client Keys (DSN) > Generate New Key) if you want granular control over specific services.
  • Understand the membership permissions model.
  • Control access to projects with Team membership. Create at least one Team so that new members have access to a project right away.

For more information, check out our documentation on Teams and Projects.

Simplify your team’s sign-in

We recommend setting up SAML/SSO immediately so that new members can easily join your organization. Set-up only takes a few steps and can be completed by any user with the Owner or Manager role:

  1. Configure SAML or an SSO provider to manage organization access.

    Select a SAML or SSO provider

  2. Turn on open membership so that Sentry users authenticated with your Identity Provider can easily join your Sentry organization.

    Turn on open membership

If you need assistance configuring Sentry with your Identity Provider, contact Sentry’s support team through your organization’s support page.

For more information, check out our documentation on Membership and Single Sign On (SSO).

Define your first alert rules

By default, Sentry sends email notifications to all members of a Project when an “event is first seen.” This default exists to make it easy to test if Sentry is working but can become noisy.

Default alert rule

We recommend creating a few custom Alert Rules to make notifications actionable for your teams. We also recommend starting with these conditions:

  • Number of times seen - Indicates the scope or severity of an error within specific time thresholds (1 minute, 5 minutes, etc.)
  • Regressions - Indicates that an issue you’ve once resolved needs fixing, again.

For more information, check out our Alert Rule documentation and our Sentry Workflow --- Alert blog post.

Configure source maps

If you minify your JavaScript code, you can upload source maps to Sentry. We’ll un-minify your code and give you a stack trace for each event that provides the context necessary for efficient debugging.

To get started, check out our source map documentation for JavaScript and Node. You might also find our 4 Reasons Why Your Source Maps are Broken blog post helpful.

First 90 Days: Getting better

Level-up your Sentry configuration with customization and advanced alert routing best practices to make debugging even more efficient.

Enrich your error data

Customize your SDK to collect context about your errors and unlock powerful functionality in Sentry.

  • User - Use the # of users impacted alert condition to help determine the scope and severity of an error.
  • Tags - Send Sentry any key/value pair. Tags are especially useful in searching for issues (and saving a search as a dashboard) and in Discover queries. You can also specify your custom tags as part of your Alert Rules. When setting tags, consider these questions:
    • What information helps you understand the significance of an issue? For example, if an error occurs on the checkout page, you can set a tag for feature: "checkout".
    • What information is important to debugging an issue? For example, the version of your platform used by a person experiencing this error could be helpful.
  • Level - Manually indicate the severity of an event. You can also use level as an Alert Rule condition.

_For more information, check out this advanced guide on how to maximize your SDK configuration._

Leverage advanced alert routing

With richer error data you can create more advanced alert rules that link context, thresholds, environments, and Teams for more actionability around errors. We recommend starting with these customizations:

  • Create an Alert to route errors with certain tags to specific Teams. You can also couple this with the Slack Integration (i.e., routing errors with certain tags to specific Slack channels).
  • Create an Alert to route errors with a certain Level to PagerDuty or some other escalation path (like an #Urgent Slack Channel).
  • Create an Alert to route errors.

_For more information, check out this advanced guide on how to maximize the power of Alerts._

Associate commits with errors

When you associate commits with errors in Sentry, you unlock the ability to identify regressions, decrease time to error resolution by predicting the commit causing the issue and who’s likely responsible, and resolve issues using the issue number in your commit message.

There are a few ways you can associate commit data with errors --- each with their own advantage:

Save Queries

Sentry Discover is the foundation for querying raw event data in Sentry, across all projects. It’s particularly valuable when you’ve enriched your event data because you can run queries based on your customized event context. Use Discover to build and save queries that are helpful to you in identifying trends in issues. Here are a few things that you can do using Discover:

  • Access event charts tracking error volume, handled vs. unhandled events, affected users, types of browsers and devices, etc.
  • Use top-level filters to immediately get information about specific projects and environments including what’s happening during a specific period.

Here are a few sample queries:

A sample query

See a breakdown of the most common issues across the entire organization, limited to 1000 results.

Common issues

Tally up which files in our projects are associated with the most errors to investigate which part of an application needs the most attention.

Geo query

Error events split out by geography, showing which regions are responsible for the highest error volumes.

What you’ll get (mostly) out-of-the-box

Sentry has core features that require little configuration.

Environments

Each project may have a dev, staging, and production environment associated with it. Sentry provides a top-level filter for each environment within a project.

Environment selector

Alert rules can also be specified based on environment.

Custom breadcrumbs

Breadcrumbs are the actions a user took before encountering an error. Breadcrumbs are useful when you need to reproduce an error as part of the debugging process.

They can be customized with rich structured data and added whenever something interesting happens. For instance, it might make sense to record a breadcrumb if the user authenticates or another state change happens.

Issue management integrations

Set-up any of our global issue management integrations once and any project in your Sentry organization will be able to link Sentry issues to your third-party provider.

Issue notification integrations

Sentry’s Slack integration is global to your Sentry organization and only needs to be set-up once. After it’s set-up, you can send issue notifications to different Slack channels and assign or resolve issues from directly within Slack.

For more information, read more about the integration’s potential here.

You can save searches in Sentry for quick reference to common queries you use. Saved searches are configurable so your entire organization can access them or you can save them to your own personal view. For example, you may want to save a search on issues that need triaging. It’s also possible to set a default search.

Saving a custom search

Sentry issue actions

Manage your issues by taking action on them in one of four ways:

  • Delete/Discard - Get rid of issues that aren’t important to your business. These won’t count toward your event quota.

Delete and discard issues

  • Ignore - Ignore issues for a set period or until they become a bigger issue (i.e., if it continues to appear or affects another N users).

Delete and discard issues

  • Assign - you can assign Issues to an individual or a #Team. You can later search for issues that are assigned to particular Teams or Users and also for issues that are unassigned.

Ignore issues

  • Resolve - Mark issues as Resolved directly within Sentry.

Resolve issues

Surfacing context in your SDK configuration is a great first step to increasing visibility for all of the exceptions that come in to Sentry. By doing this, you can expose important pieces of metadata related to different parts of your application. As such, the suggestions below will enable your team to triage and prioritize issues in Sentry more effectively.

Get in touch.

By filling out this form, you agree to our privacy policy. This form is protected by reCAPTCHA and Google's Privacy Policy and Terms of Service apply.
© 2024 • Sentry is a registered Trademark
of Functional Software, Inc.