Skip to content

Commit

Permalink
feat(alerts): Alert wizard v3 alert config docs (#5107)
Browse files Browse the repository at this point in the history
* feat(alerts): Alert wizard v3 alert config docs

* addressing comments updating screenshots

* update screenshot

* review 2

* reverting an accidental change

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
  • Loading branch information
taylangocmen and imatwawana authored Jun 8, 2022
1 parent 2ec2465 commit 7e00c87
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 33 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/docs/product/alerts/create-alerts/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ The minimum role required to create alerts is member. Sentry users with manager

To create alerts:
1. Navigate to **Alerts** and click "Create Alert Rule".
1. Select your project.
1. Choose what you want to be alerted about. Selecting “Issues” creates an [issue alert](/product/alerts/alert-types/#issue-alerts), while selecting any other option creates a [metric alert](/product/alerts/alert-types/#metric-alerts).
![Choice between alerts about Errors, Sessions, Performance, or a Custom Metric](create-new-alert-rule.png)

Expand Down
16 changes: 10 additions & 6 deletions src/docs/product/alerts/create-alerts/issue-alert-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@ Specify which <PlatformLink to="/configuration/environments/">environment(s)</Pl

The “Environment” dropdown list here has the same environments that are available for the selected project in the common “Environment” filter dropdown (this does not include hidden environments). Selecting "All Environments" is equivalent to having no environment filter.

## Team

You can choose a team to associate with an alert so that members of that team can edit the alert. Note that you can only make this association if you are a member of the team. If no team is selected, anyone can edit the alert.
## Project

## Alert Name

Give your alert a descriptive name, such as the team affected and the topic of the alert. For example, "Frontend Latency", "Backend Failure Rate", or "Billing Apdex".
Specify which project will use this particular alert rule. The created alert rule will only process events from this project.

## "When" Conditions: Triggers

Expand Down Expand Up @@ -120,6 +116,14 @@ The available intervals are:
- Hours: 3, 12, 24
- Days: 7, 30

## Alert Name

Give your alert a descriptive name, such as the team affected and the topic of the alert. For example, "Frontend Latency", "Backend Failure Rate", or "Billing Apdex".

## Team

You can choose a team to associate with an alert so that members of that team can edit the alert. Note that you can only make this association if you are a member of the team. If no team is selected, anyone can edit the alert.

## Project-Level Alert Settings

In **[Project] > Settings > Alerts**, you can configure alert email subject templates and digest settings. Sentry users with owner, manager, or admin permissions and above can change these default notification settings.
Expand Down
70 changes: 44 additions & 26 deletions src/docs/product/alerts/create-alerts/metric-alert-config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,25 @@ description: "Learn more about the options for configuring a metric alert."

Sentry provides several configuration options to create a metric alert based on your organization's needs.

## Filters

The following set of filters translates into a [Discover query](/product/discover-queries/) that is displayed in the chart at the top of the alert configuration page.

### Environment

Specify which <PlatformLink to="/configuration/environments/">environment(s)</PlatformLink> will use this particular alert rule. This control filters on the `environment` tag in your events. This filter is helpful because the urgency and workflows you apply to production alerts might differ from those you apply to alerts originating from your QA environment, for example.

The “Env:” dropdown list here has the same environments that are available for the selected project in the common “Environment” filter dropdown (this does not include hidden environments). Selecting "All" is equivalent to having no environment filter.

### Event Type

For some metric alerts, you can set the event type that you want to be alerted about in the “Events” dropdown:
## Metric (Type + Function + Time Interval)

- `event.type:error` OR `event.type:default`
- `event.type:default`
- `event.type:error`
- `event.type:transaction`
To create a metric alert you first need to choose a metric type. For some alert types the function is built into the alert and for others you can choose functions and parameters to apply to it. For example, if you select “Users Experiencing Errors”, that translates to the function, `count_unique(user.id)`. Since editing this function would change the nature of the alert, it is not editable and thus hidden. On the other hand, if you select “Largest Contentful Paint” the measurement used is `measurement.lcp`, you also need to choose a function, e.g. `p75()`, for a combined metric function of `p75(measurement.lcp)`.

### Tags & Attributes
### Metrics Types for Alerting

Add filters in the field provided to narrow down what you'll be alerted about, such as URL, tags, or other event properties.

## Metric (Function + Time Interval)

Depending on the type of alert you’ve selected, you may be able to choose functions and parameters to apply to it. In other cases, the function is built into the alert and the settings aren't displayed. For example, if you select “Number of Users Affected”, that translates to the function, `count_unique(user.id)`. Since editing this function would change the nature of the alert, it is not editable and thus hidden.
- Number of Errors
- Users Experiencing Errors
- Crash Free Session Rate
- Crash Free User Rate
- Throughput
- Transaction Duration
- Apdex
- Failure Rate
- Largest Contentful Paint
- First Input Delay
- Cumulative Layout Shift

### Functions for Alerting
### Functions for Metric Types

- `count()`
- `count_unique(...)`
Expand All @@ -59,11 +50,38 @@ Choose the time period over which to evaluate your metric. Your choices range be
- At 3:02pm: 2:02pm - 3:02pm
- ...

## Filters

The following set of filters translates into a [Discover query](/product/discover-queries/) that is displayed in the chart at the top of the alert configuration page.

### Project

Specify which project will use this particular alert rule. Created alert rule will only process events from this project.

### Environment

Specify which <PlatformLink to="/configuration/environments/">environment(s)</PlatformLink> will use this particular alert rule. This control filters on the `environment` tag in your events. This filter is helpful because the urgency and workflows you apply to production alerts might differ from those you apply to alerts originating from your QA environment, for example.

The “Environment” dropdown list here has the same environments that are available for the selected project in the common “Environment” filter dropdown (this does not include hidden environments). Selecting "All Environments" is equivalent to having no environment filter.

### Event Type

For some metric alerts, you can set the event type that you want to be alerted about in the “Events” dropdown:

- `event.type:error` OR `event.type:default`
- `event.type:default`
- `event.type:error`
- `event.type:transaction`

### Tags & Attributes

Add filters in the field provided to narrow down what you'll be alerted about, such as URL, tags, or other event properties.

## Thresholds

There are two threshold types:

- **Count**: A fixed threshold, such as when there are 100 errors in a period of time.
- **Static**: A fixed threshold, such as when there are 100 errors in a period of time.
- **Percent change**: A dynamic threshold, such as when there are 10% more errors in a time period compared to a previous period. These are also referred to as [Change Alerts](#change-alerts-percent-change).

By default, metric alerts use a fixed threshold.
Expand All @@ -76,7 +94,7 @@ This feature is available only if your organization is on either a Business or T

</Note>

Change alerts, or alerts that use a percent change threshold, are useful when you want to know if a metric is significantly different from normal. To do this, you’ll need to set the time period to compare to. One example would be comparing the number of errors in the last hour to the same time period one week ago. If errors are 25% higher in the last hour than they were in the same period a week ago, then an alert will trigger.
Change alerts, or alerts that use a percent change threshold, are useful when you want to know if a metric is significantly different from normal. To do this, you’ll need to pick a metric interval (when you're selecting your metric type) and a time against which to compare. One example would be comparing the number of errors in the last hour to the same time period one week ago. If errors are 25% higher in the last hour than they were in the same period a week ago, then an alert will trigger.

![When the percent change option is selected.](percent-change.png)

Expand Down
Binary file modified src/docs/product/alerts/create-alerts/percent-change.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit 7e00c87

@vercel
Copy link

@vercel vercel bot commented on 7e00c87 Jun 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

sentry-docs – ./

sentry-docs.sentry.dev
docs.sentry.io
sentry-docs-git-master.sentry.dev

Please sign in to comment.