# <a id="bitdrift.public.unary.alerts.v1.SloAlertConfig"></a>SloAlertConfig

**Source definition:** [`src/bitdrift/public/unary/alerts/v1/alerts.proto#L65-L112`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/alerts/v1/alerts.proto#L65-L112>)

SLO alerts can only be defined on rate time series. The config will be failed otherwise. The
 Rate is assumed to be <good results> / <total results>. Ultimately the windows and burn rates
 are what drives alerting, but the SLO duration is still required so that error budget
 consumption can be calculated. Additionally, we can use the SLO duration to show SLO adherence
 over the trailing window if we like.

<section class="proto-fields-table" markdown>
| Field | Type | Description |
|---|---|---|
| slo_duration | <span class="proto-type proto-type-well-known">[google.protobuf.Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration "google.protobuf.Duration")</span> | Currently only supports 7 days and 30 days. |
| slo_target | <span class="proto-type proto-type-primitive">double</span> | A percentage expressed as a number between 0 and 1. E.g., 0.99 for 99% or 0.95 for 95%. |
| limit_strategy | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">charts</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">LimitStrategy</i>](bitdrift_public_unary_charts_v1_LimitStrategy.md "bitdrift.public.unary.charts.v1.LimitStrategy")</span> | Optional limit strategy to use for this alert. If this is omitted, a default value of limiting  by a top k of 5 entries is used. Ultimately this will allow alerting on specific dimensions  for a group by aggregate ID if desired. |
| window_and_burn_rates | <span class="proto-type proto-type-message">array of [<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">alerts</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">SloAlertConfig</i><i class="proto-type-dot">.</i><i class="proto-type-part">WindowAndBurnRate</i>](#bitdrift.public.unary.alerts.v1.SloAlertConfig.WindowAndBurnRate "bitdrift.public.unary.alerts.v1.SloAlertConfig.WindowAndBurnRate")</span><br><em class="proto-field-annotation">between 1 and 10 items</em> | The list of window and burn rates to use for the SLO alert. Each WindowAndBurnRate defines a  short and long window, as well as a burn rate. The alert will trigger if any of the  WindowAndBurnRates breach the SLO target based on the burn rate. |

</section>
<p class="h4">Example</p>
```json
{
  "limit_strategy": {
    "exclusions": {
      "dimension_identifiers": [
        {
          "id": "time_series_id_opaque_example",
          "labels": [
            {
              "name": "name",
              "value": "value"
            }
          ]
        }
      ],
      "return_other": false
    },
    "sort_order": "MAX",
    "top_k_limit": {
      "top_k": 5
    }
  },
  "slo_duration": "3600s",
  "slo_target": 0.99,
  "window_and_burn_rates": [
    {
      "burn_rate": 14.0,
      "long_window": "3600s",
      "notifications": {
        "custom_notification_text": "@incident-commander Review the current burn rate.",
        "notifications": [
          {
            "min_time_between_notifications": "3600s",
            "notification_config": {
              "disabled": false,
              "notification_group": {
                "name": "engineering-oncall"
              }
            }
          }
        ]
      },
      "short_window": "3600s"
    }
  ]
}
```

# <a id="bitdrift.public.unary.alerts.v1.SloAlertConfig.WindowAndBurnRate"></a>SloAlertConfig.WindowAndBurnRate

**Source definition:** [`src/bitdrift/public/unary/alerts/v1/alerts.proto#L69-L92`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/alerts/v1/alerts.proto#L69-L92>)

SLO alerts use MWMBR (Multi-Window/Multi-Burn Rate). Each alert evaluation looks at every
 WindowAndBurnRate and alerts if any of them alert. For an individual WindowAndBurnRate to alert
 both the short window AND long window must breach based on the SLO target and burn rate.

<section class="proto-fields-table" markdown>
| Field | Type | Description |
|---|---|---|
| short_window | <span class="proto-type proto-type-well-known">[google.protobuf.Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration "google.protobuf.Duration")</span> | Short evaluation window for this burn-rate policy. |
| long_window | <span class="proto-type proto-type-well-known">[google.protobuf.Duration](https://protobuf.dev/reference/protobuf/google.protobuf/#duration "google.protobuf.Duration")</span> | Long evaluation window for this burn-rate policy. |
| burn_rate | <span class="proto-type proto-type-primitive">double</span> | Burn rate threshold that causes this policy to trigger. |
| notifications | <span class="proto-type proto-type-message">[<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">alerts</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">SloAlertConfig</i><i class="proto-type-dot">.</i><i class="proto-type-part">WindowAndBurnRate</i><i class="proto-type-dot">.</i><i class="proto-type-part">OverrideNotifications</i>](#bitdrift.public.unary.alerts.v1.SloAlertConfig.WindowAndBurnRate.OverrideNotifications "bitdrift.public.unary.alerts.v1.SloAlertConfig.WindowAndBurnRate.OverrideNotifications")</span> | Notification targets for the alert when this WindowAndBurnRate triggers. If unset, the  CommonAlertConfig.notifications will be used. |

</section>
<p class="h4">Example</p>
```json
{
  "burn_rate": 14.0,
  "long_window": "3600s",
  "notifications": {
    "custom_notification_text": "@incident-commander Review the current burn rate.",
    "notifications": [
      {
        "min_time_between_notifications": "3600s",
        "notification_config": {
          "disabled": false,
          "notification_group": {
            "name": "engineering-oncall"
          }
        }
      }
    ]
  },
  "short_window": "3600s"
}
```

# <a id="bitdrift.public.unary.alerts.v1.SloAlertConfig.WindowAndBurnRate.OverrideNotifications"></a>SloAlertConfig.WindowAndBurnRate.OverrideNotifications

**Source definition:** [`src/bitdrift/public/unary/alerts/v1/alerts.proto#L71-L78`](<https://github.com/bitdriftlabs/api/blob/main/src/bitdrift/public/unary/alerts/v1/alerts.proto#L71-L78>)

Overrides the default notification settings for this burn-rate window.

<section class="proto-fields-table" markdown>
| Field | Type | Description |
|---|---|---|
| notifications | <span class="proto-type proto-type-message">array of [<i class="proto-type-part">bitdrift</i><i class="proto-type-dot">.</i><i class="proto-type-part">public</i><i class="proto-type-dot">.</i><i class="proto-type-part">unary</i><i class="proto-type-dot">.</i><i class="proto-type-part">alerts</i><i class="proto-type-dot">.</i><i class="proto-type-part">v1</i><i class="proto-type-dot">.</i><i class="proto-type-part">RateLimitedNotificationConfig</i>](bitdrift_public_unary_alerts_v1_RateLimitedNotificationConfig.md "bitdrift.public.unary.alerts.v1.RateLimitedNotificationConfig")</span><br><em class="proto-field-annotation">up to 100 items</em> | Notification targets for the alert when this OverrideNotifications is used. |
| custom_notification_text | <span class="proto-type proto-type-primitive">optional string</span><br><em class="proto-field-annotation">up to 2048 chars</em> | Custom notification text to use when this OverrideNotifications is used. If not set,  the CommonAlertConfig.custom_notification_text will be used. |

</section>
<p class="h4">Example</p>
```json
{
  "custom_notification_text": "@incident-commander Review the current burn rate.",
  "notifications": [
    {
      "min_time_between_notifications": "3600s",
      "notification_config": {
        "disabled": false,
        "notification_group": {
          "name": "engineering-oncall"
        }
      }
    }
  ]
}
```

