Enable custom alert types in Cost Insights

This commit is contained in:
Tim Hansen
2020-10-08 14:25:56 -06:00
parent 55602200a3
commit 6a84cb0726
20 changed files with 264 additions and 297 deletions
+8
View File
@@ -104,3 +104,11 @@ costInsights:
metricC:
name: Metric C
```
## Alerts
The CostInsightsApi `getAlerts` method may return any type of alert or recommendation (called collectively "Action Items" in Cost Insights) that implements the [Alert type](https://github.com/spotify/backstage/blob/master/plugins/cost-insights/src/types/Alert.tsx). This allows you to deliver any alerts or recommendations specific to your infrastructure or company migrations.
The Alert type includes an `element` field to supply the JSX Element that will be rendered in the Cost Insights "Action Items" section; we recommend using Backstage's [InfoCard](https://backstage.io/storybook/?path=/story/layout-information-card--default) and [Recharts](http://recharts.org/en-US/) to show actionable visualizations.
The Alert `url` should link to documentation or instructions for resolving the alert.