Merge pull request #6717 from vannarath-poeu/currency-config

[Cost Insights] Currencies config
This commit is contained in:
Patrik Oldsberg
2021-09-29 13:54:40 +02:00
committed by GitHub
7 changed files with 141 additions and 7 deletions
+30
View File
@@ -148,6 +148,36 @@ costInsights:
name: Metric C
```
### Currencies (Optional)
In the `Cost Overview` panel, users can choose from a dropdown of currencies to see costs in, such as Engineers or USD. Currencies must be defined as keys on the `currencies` field. A user-friendly label and unit are **required**. If not set, the `defaultCurrencies` in `currenc.ts` will be used.
A currency without `kind` is reserved to calculate cost for `engineers`. There should only be one currency without `kind`.
```yaml
## ./app-config.yaml
costInsights:
engineerCost: 200000
products:
productA:
name: Some Cloud Product
icon: storage
productB:
name: Some Other Cloud Product
icon: data
currencies:
metricA:
currencyA:
label: Currency A
unit: Unit A
currencyB:
label: Currency B
kind: CURRENCY_B
unit: Unit B
prefix: B
rate: 3.5
```
## 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/backstage/backstage/blob/master/plugins/cost-insights/src/types/Alert.ts). This allows you to deliver any alerts or recommendations specific to your infrastructure or company migrations.