- Completion alerts inform you about a finished pipeline run, including its status (Success, Failure, Cancelled, or Skipped).
- Anomaly alerts tell you when the duration of a pipeline run deviates significantly from historical baselines.
- Email: Alerts are sent to the email address you use to log in to Maia.
- Slack: Alerts are sent to a channel via an incoming Slack webhook.
- Webhook: Alerts are sent to an app via an incoming webhook.
Use cases
- Environment-specific routing: Send development failures to a sandbox channel and production alerts to your high-priority alerts channel.
- Noise reduction: Rather than building alerts into every pipeline, simply subscribe to a project or environment once.
- Anomaly detection: Receive alerts when a pipeline run takes significantly longer or shorter than expected, so you can investigate performance issues before they escalate.
Completion alerts
Completion alerts contain the following information about the completed pipeline run:- Pipeline name and file path within your project
- Pipeline run status
- End time of the pipeline run
Anomaly alerts
Anomaly alerts notify you when a pipeline run’s duration deviates significantly from its historical baseline. Anomaly alerts contain the following information about the pipeline run that deviated from its baseline:- Pipeline name
- Anomaly type
- Environment name
- Start timestamp
- Elapsed duration
- Expected upper and lower bounds
Requirements for calculating a duration baseline
A pipeline must complete at least 10 successful runs before Maia can calculate a baseline for its duration and send anomaly alerts. Maia can’t send anomaly alerts for pipelines with fewer than 10 completed runs. When you publish a new pipeline version, this baseline resets. The new version of the pipeline must complete 10 successful runs before Maia can resume sending anomaly alerts.How duration anomalies are calculated
Maia compares every pipeline run’s duration against that pipeline’s own recent history. If the run falls well outside the range of normal durations, it’s flagged as a duration anomaly. There are two types of duration anomaly:- Slow anomaly—the run took longer than expected. This can be detected while the pipeline is still running, as well as at completion.
- Fast anomaly—the run finished unusually quickly. This is only detected at completion.
- It takes the median (middle) run duration as the center of “normal.”
- It measures how far normal runs spread above the median—out to the slowest runs that are still routine (the 99th percentile). It does the same on the fast side, down to the quickest routine runs (the 1st percentile).
- The upper bound (slow threshold) is the median plus twice that upward spread. A run has to land well beyond even the normally-slow end of the range before it’s flagged as slow.
- The lower bound (fast threshold) is the median minus twice the downward spread, and never drops below zero. For most pipelines it works out to zero—so they’re never flagged as “too fast.” It only becomes meaningful for pipelines that normally run long and consistently, where finishing in a fraction of the usual time is a genuine signal that the run did little or no work.
Subscribe to notifications
The steps for subscribing to completion alerts and anomaly alerts are the same.Prerequisites
- To receive alerts for a pipeline, you need access to the project and environment where the pipeline runs.
- To receive alerts via Slack, you need an incoming webhook URL for the Slack channel you want to send the alert to. For more information about creating incoming webhook URLs in Slack, read the Slack Sending messages using incoming webhooks documentation.
- To receive alerts via a webhook, you need an incoming webhook URL that represents where to send the message. For more information about creating or obtaining an incoming webhook URL in your chosen destination, read the destination provider’s incoming webhook documentation.
Setup
- In the left navigation, click your Profile & Account icon, then Notifications.
- Click Add notification.
- Select the Project and Environment you’d like to be notified about.
-
Click Add next to the alert types you want to subscribe to: Pipeline completion alerts and/or Anomaly alerts.
- If you’re subscribing to pipeline completion alerts, select the statuses you want to receive alerts about: Success, Failure, Cancelled, and/or Skipped.
- If you’re subscribing to anomaly alerts, select Enable anomaly alerts.
You can add any number of alerts for the selected project and environment. This allows you to combine different alert conditions and delivery methods, for example to send successful pipeline completion alerts and failed pipeline completion alerts to different Slack channels. -
Select one or more delivery methods for the selected alert type: Email, Slack, and/or Webhook.
- Email
- Slack
- Webhook
No additional setup is required. Alerts are sent to the email address you use to log in to Maia. - Click Add notification. You’ll go back to the Manage notifications list.
Variables in webhook payloads
If you select the Webhook delivery method, you can use variables in the payload template. When the alert is sent, the variable will be replaced with its corresponding value.Pipeline completion alert variables
For example:
Anomaly alert variables
For example:
Manage pipeline notifications
After creating a notification, you’ll return to the Manage notifications list. This table contains the following information about the notifications you have subscribed to:- Project: The project you’re receiving notifications for.
- Environment: The environment you’re receiving notifications for.
- Type: The alert type: Completion or Anomaly.
- Trigger: The events that will trigger the alert. For pipeline completion alerts, this lists the pipeline statuses you selected. For anomaly alerts, this always says Anomaly.
- Delivery: The delivery methods you selected and, if applicable, the webhook or Slack webhook name.
