Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(alerts): Alert wizard v3 alert config docs #5107

Merged
merged 5 commits into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
taylangocmen marked this conversation as resolved.
Show resolved Hide resolved

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.
taylangocmen marked this conversation as resolved.
Show resolved Hide resolved

## 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
68 changes: 43 additions & 25 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`
taylangocmen marked this conversation as resolved.
Show resolved Hide resolved

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

- `count()`
- `count_unique(...)`
Expand All @@ -59,6 +50,33 @@ 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.

taylangocmen marked this conversation as resolved.
Show resolved Hide resolved
### 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:
taylangocmen marked this conversation as resolved.
Show resolved Hide resolved
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 period and time interval 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.
taylangocmen marked this conversation as resolved.
Show resolved Hide resolved

![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.