-
Notifications
You must be signed in to change notification settings - Fork 52
[weave] Alerts on monitors page DOCS-1938 #2261
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c12288d
rough draft based on Figma
anastasiaguspan 704d0ab
Draft for alerts on monitors
anastasiaguspan 0a5f41f
updates to actual ui
anastasiaguspan cf3e1fc
updates to latest eng changes
anastasiaguspan c8810e9
Update weave/guides/evaluation/automations.mdx
anastasiaguspan df24d0f
Update weave/guides/evaluation/automations.mdx
anastasiaguspan 399a298
Update weave/guides/evaluation/automations.mdx
anastasiaguspan 63bf96e
updates from pr
anastasiaguspan f475927
Merge branch 'main' into alert-on-monitors-docs-1938
anastasiaguspan 04613d5
Update weave/guides/evaluation/automations.mdx
anastasiaguspan 1eebc27
Update weave/guides/evaluation/automations.mdx
anastasiaguspan 684fdd6
Update weave/guides/evaluation/automations.mdx
anastasiaguspan fd79873
Update weave/guides/evaluation/automations.mdx
anastasiaguspan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| --- | ||
| title: "Set up automations" | ||
| description: "Create event-driven automations that trigger actions based on monitor metrics and trace activity." | ||
| --- | ||
|
|
||
| Automations let you define event-driven rules that trigger actions when specific conditions are met in your project. Instead of manually watching dashboards for metric changes, you configure an automation once, and W&B Weave runs an action for you when the event occurs. Use cases include: | ||
|
|
||
| - **Threshold alert**: Send a Slack notification when a monitor's average score crosses a threshold. | ||
| - **Regression detection**: Send an alert when a scorer detects a drop in accuracy or an increase in toxicity. | ||
| - **Deployment gate**: Trigger a webhook when a quality metric exceeds a confidence threshold over a rolling window. | ||
| - **Operational monitoring**: Send an alert when error rates or latency metrics change. | ||
|
|
||
| You manage automations in the Weave UI, with no code changes required. | ||
|
|
||
|
|
||
| ## Create an automation | ||
|
|
||
| Create an automation by configuring the triggering event and selecting what action to take. | ||
|
|
||
| ### Prerequisites | ||
|
|
||
| The triggering event (such as an Op or a monitor) and the action (such as a Slack integration) must exist before you create the automation that connects them. | ||
|
|
||
| - In Weave, set up an [Op](/weave/guides/tracking/create-call) or a [monitor](/weave/guides/evaluation/monitors) of interest. | ||
| - In your Team Settings, set up a [Slack integration](/models/automations/create-automations/slack#add-a-slack-integration) or a [webhook](/models/automations/create-automations/webhook#create-a-webhook). | ||
|
|
||
| ### Step 1: Event configuration | ||
|
|
||
| The event configuration defines what condition triggers the automation. You select a monitor metric, a time window, and a threshold. | ||
|
|
||
| To create an automation: | ||
| 1. Navigate to [wandb.ai](https://wandb.ai) and open your project. | ||
| 2. In the project sidebar, click **Automations**. | ||
| 3. In the Automations page header, click **Create automation**. | ||
| 4. In the **Create automation** modal dialog, configure the event: | ||
| - **Event**: Select the type of event that triggers this automation, such as a Weave metric threshold. | ||
| - **Source**: Select the automation source to be either an **Operation** or a **Monitor** from your project. | ||
| - **Operation**: Select the **Op name** whose traces are evaluated by the monitor. The list contains Ops that have logged at least one trace in the project. | ||
| - **Monitor**: Select the **Monitor** that produces the metric you want to track. | ||
| - **Metric**: Select the metric to measure for the alert. | ||
| - **Metric Threshold**: Define the condition that triggers the automation. Select a comparator (such as "is above") and provide the threshold value (such as `0.9`). | ||
| - **Window**: Configure the window used to trigger the automation to be either **Time-based** or **Count-based**. Select the aggregation function (such as **Average**) and the rolling period (such as **1 day**). | ||
| - **Aggregation**: Set the aggregation function (such as mean, median, minimum) to apply to metric values within the window before comparing to the threshold. | ||
| 5. Review the **Alert preview** graph to confirm thresholds are set up to alert the way you would expect. | ||
| 6. Click **Next step** to proceed to action configuration. | ||
|
|
||
| ### Step 2: Action configuration | ||
|
|
||
| The action configuration defines what action happens when the event condition is met. | ||
|
|
||
| To configure the action: | ||
| 1. In the **Step 2 of 3** panel, configure: | ||
| - **Team**: Select the team that wants to receive the notification. | ||
| - **Action type**: Select the type of action to perform, such as sending a **Slack notification**. | ||
| - **Action details**: Depending on the action type, provide the required configuration: | ||
| - For Slack notifications, select the **Slack channel** to send the notification to. | ||
| - For webhooks, provide the **Webhook** name and **Payload**. | ||
| 2. Click **Next step** to proceed to the summary. | ||
|
|
||
| ### Step 3: Summary | ||
|
|
||
| The summary step displays a complete overview of the automation before you save it. | ||
|
|
||
| To save: | ||
| 1. Configure the automation metadata: | ||
| - **Automation name**: Provide a name for the automation that will be displayed in the Automations table. | ||
| - **Description** (Optional): Add a description to help identify the automation's purpose. | ||
| 2. Click **Create automation** to create the automation. | ||
|
|
||
| The new automation appears in the Automations table on the Automations page. | ||
|
|
||
| ## Create an automation from a monitor | ||
|
|
||
| You can also create automations directly from a monitor's detail view. This approach pre-fills the event configuration with the monitor's context, which makes the setup faster. Before you create the automation, set up a [Slack integration](/models/automations/create-automations/slack#add-a-slack-integration) or a [webhook](/models/automations/create-automations/webhook#create-a-webhook) that you want to use as your selected action. | ||
|
|
||
| To create an automation from a monitor: | ||
| 1. In the Weave project sidebar, click **Monitors**. | ||
| 2. In the Monitors table, click the name of the monitor to open its detail panel. | ||
| 3. In the monitor detail panel, select the **Automations** tab to see any existing automations for this monitor. | ||
| 4. In the Automations section toolbar, click **Create automation**. | ||
| 5. In the **Create automation** panel, the event configuration is pre-filled with the selected monitor's details. Adjust the configuration as needed: | ||
| - **Metric**: Select the metric to measure for the alert. | ||
| - **Metric Threshold**: Define the condition that triggers the automation. Select a comparator (such as "is above") and provide the threshold value (such as `0.9`). | ||
| - **Window**: Configure the window used to trigger the automation to be either **Time-based** or **Count-based**. Select the aggregation function (such as **Average**) and the rolling period (such as **1 day**). | ||
| - **Aggregation**: Set the aggregation function (such as mean, median, minimum) to apply to metric values within the window before comparing to the threshold. | ||
| 6. Click **Next** and complete the remaining steps (select action and save) as described in [Create an automation](#create-an-automation). | ||
|
|
||
| ## View and manage automations | ||
|
|
||
| All automations in your project are listed on the **Automations** page. The table displays the following information for each automation: | ||
|
mdlinville marked this conversation as resolved.
|
||
|
|
||
| - **Automation**: The automation name and description. | ||
| - **Event type**: The type of event that triggers the automation. | ||
| - **Action type**: The action that is triggered, such as generating a Slack notification. | ||
| - **Date created**: When the automation was created. | ||
| - **Last execution**: When the automation last triggered. | ||
|
|
||
|
|
||
| To view automations: | ||
| 1. In the Weave project sidebar, click **Automations**. | ||
| 2. Use the search field in the table toolbar to filter automations by name. | ||
|
|
||
| You can click the name of an automation to open the automation drawer and review the full details of the automation. | ||
|
|
||
| The History tab displays a record of all triggered automations. When an automation fires, Weave creates an automation instance that records what happened. You can inspect these instances to understand when and why an automation triggered. | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the section I meant for step 3 from above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
step 3 i didn't really feel fit(/didn't follow) since it was in a section titled Prerequisites for creating an automation - kinda cyclic/recursive. (e.g citing the thing as step 3 in prereqs for the thing the prereq is a prereq of)
maybe i need to clarify this, but 'creating an automation from a monitor' is just a minor subset of steps from 'creating a automation' (e.g. it is a shortcut of one selection box). its an alternative method. It's frankly not very useful, but mentioned for completeness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before you can create the automation in Weave, you need a) a monitor, and b) either a webhook or a Slack integration configured in your team. That's what I mean. Maybe we are on the same page after Slack conversation.