Create a Metric Alert Policy
Create a metric alert policy in Harness FME to get notified when a feature flag degrades a metric.
A metric alert policy allows you to configure a degradation threshold for your metrics. Harness FME monitors your metric impact for every feature flag using a percentage rollout, for the duration of the monitoring window. You are alerted if the observed impact for a metric exceeds the threshold you define.
Create a metric alert policy
To create a metric alert policy, do the following:
In Harness FME, create a new metric, or select a metric for which you want to create an alert policy. Go to Create a metric for the metric creation steps.
On the metric's Alert policy tab, click Create alert policy.
Provide a name and description for the alert policy.
Name: Give your alert policy a recognizable name. Harness recommends including the name of the associated metric in the policy name.
Description: Optionally, give your alert policy a description. This can include anything useful to you and your team if an alert fires, such as runbooks, alerting protocols, and key information about the alert.
An alert policy can have multiple alert conditions. For each alert condition, fill in the fields as follows:
Choose your environment: Select the environment you want to apply the alert condition to. Each alert condition relates to a particular environment, and you are limited to one alert condition per environment. When you create additional alert conditions, any environment for which you have already configured an alert condition is not available in the environment menu list.
Set alert threshold: You can add a relative percentage threshold or an absolute value threshold. An alert fires when this threshold is exceeded in the degradation direction, which is the opposite of the desired direction of the metric. Go to Choosing your degradation threshold for alerting to select a threshold.
Define alert notification channel: Configure who to notify if an alert fires. By default, the metric owner is selected. You can also select the feature flag owners, any existing users and groups, and enter additional email addresses of your choice.
Click Add alert condition to add alert conditions for other environments.
After you finish entering your conditions, click Create alert policy. You now have a new alert policy.
When a metric alert is triggered
When Harness FME identifies that a feature flag has caused a degradation in a metric, an alert is triggered for the metric alert policy, and the recipients you selected in the alert notification channel receive an email. The alert summary is also displayed on the Definition and Alerts tabs for the feature flag that caused the degradation.
When a metric alert is triggered, the recipients receive an email in the following format:
The alert notification email contains information about the specific feature flag version, rule, and treatment that triggered the alert, in comparison with the baseline treatment. In Harness FME, you can explore the results further on the Metrics impact page.
Metric alert summary in Harness FME
When a feature flag causes a metric alert to trigger, a banner is displayed on the feature flag's Definition tab. Additional details are available on the feature flag's Alerts tab.
If an alert triggers, the following information is displayed in a table on the Alerts tab:
Alert fired
Displays the timestamp when the metric alert is triggered. You can take action on the alert by clicking the menu list.
Activity
Displays the status of the alert, whether it is dismissed or auto-resolved. Hover over the text to access the timestamp of the action in this column.
Name of policy
Displays the name of the metric alert policy. Click the name to go directly to the alert policy builder.
Rule
Displays the feature flag's targeting rule that caused the alert to fire.
Relative impact %
Displays the degradation percentage that is detected and the error margin of this percentage. Hover over the text to access the timestamp of when the degradation is detected.
Absolute impact
Displays the degradation that is detected in an absolute value and the error margin of this value. Hover over the text to access the timestamp of when the degradation is detected.
Metric value (baseline)
Displays the metric value in absolute terms and the baseline treatment that is used for alert monitoring.
Metric value (treatment)
Displays the metric value in absolute terms, as well as the treatment that is used to compare against the baseline treatment for alert monitoring.
Relative threshold %
Displays the degradation threshold configured in the metric alert policy definition in relative terms, or a translation of the absolute threshold if that is used in the alert policy definition. Hover over the text to see which threshold type is used in the alert policy definition.
Absolute threshold
Displays the degradation threshold configured in the alert policy definition in absolute terms, or a translation of the relative threshold if that is used in the alert policy definition. Hover over the text to see which threshold type is used in the alert policy definition.
For each alert, you can take the following actions:
Kill feature flag
If you decide to kill a feature flag due to an alert, the default treatment overrides the existing targeting rules and is returned for all customers.
Troubleshooting metric alerts
Go to Troubleshooting alerts to diagnose an alert that did not fire as expected.
Last updated
Was this helpful?