0.12.24 • Published 19 days ago

@backstage/plugin-cost-insights v0.12.24

Weekly downloads
533
License
Apache-2.0
Repository
github
Last release
19 days ago

Cost Insights

Cost Insights is a plugin to help engineers visualize, understand and optimize their cloud costs. The Cost Insights page shows daily cost data for a team, trends over time, and comparisons with the business metrics you care about.

At Spotify, we find that cloud costs are optimized organically when:

  • Engineers see cost data in their daily work (that is, in Backstage).
  • It's clear when cloud costs need attention.
  • The data is shown in software terms familiar to them.
  • Alerts and recommendations are targeted and actionable.

Cost Insights shows trends over time, at the granularity of Backstage catalog entities - rather than the cloud provider's concepts. It can be used to troubleshoot cost anomalies, and promote cost-saving infrastructure migrations.

Install

yarn add @backstage/plugin-cost-insights

Setup

  1. Configure app-config.yaml. See Configuration.

  2. Create a CostInsights client. Clients must implement the CostInsightsApi interface. See the API file for required methods and documentation.

// path/to/CostInsightsClient.ts
import { CostInsightsApi } from '@backstage/plugin-cost-insights';

export class CostInsightsClient implements CostInsightsApi { ... }
  1. Import the client and the CostInsights plugin API to your Backstage instance.
// packages/app/src/api.ts
import { createApiFactory } from '@backstage/core';
import { costInsightsApiRef } from '@backstage/plugin-cost-insights';
import { CostInsightsClient } from './path/to/file';

export const apis = [
  createApiFactory({
    api: costInsightsApiRef,
    deps: {},
    factory: () => new CostInsightsClient(),
  }),
];
  1. Add cost-insights to your Backstage plugins.
// packages/app/src/plugins.ts
export { plugin as CostInsights } from '@backstage/plugin-cost-insights';

Configuration

Cost Insights has only two required configuration fields: a map of cloud products for showing cost breakdowns and engineerCost - the average yearly cost of an engineer including benefits. Products must be defined as keys on the products field.

You can optionally supply a product icon to display in Cost Insights navigation. See the type file for supported types and Material UI icon mappings.

Note: Product keys should be unique and camelCased. Backstage does not support underscores in configuration keys.

Basic

## ./app-config.yaml
costInsights:
  engineerCost: 200000
  products:
    productA:
      name: Some Cloud Product ## required
      icon: storage
    productB:
      name: Some Other Cloud Product
      icon: data

Metrics (Optional)

In the Cost Overview panel, users can choose from a dropdown of business metrics to see costs as they relate to a metric, such as daily active users. Metrics must be defined as keys on the metrics field. A user-friendly name is required. Metrics will be provided to the getDailyCost and getProjectCosts API methods via the metric parameter.

Note: Cost Insights displays daily cost without a metric by default. The dropdown text for this default can be overridden by assigning it a value on the dailyCost field.

## ./app-config.yaml
costInsights:
  engineerCost: 200000
  products:
    productA:
      name: Some Cloud Product
      icon: storage
    productB:
      name: Some Other Cloud Product
      icon: data
  metrics:
    dailyCost:
      name: Earth Rotation
    metricA:
      name: Metric A ## required
    metricB:
      name: Metric B
    metricC:
      name: Metric C
0.12.24

21 days ago

0.12.23

24 days ago

0.12.23-next.1

1 month ago

0.12.23-next.0

1 month ago

0.12.22

1 month ago

0.12.21

2 months ago

0.12.20

2 months ago

0.12.20-next.2

2 months ago

0.12.20-next.1

2 months ago

0.12.20-next.0

2 months ago

0.12.19

3 months ago

0.12.19-next.3

3 months ago

0.12.19-next.2

3 months ago

0.12.19-next.1

3 months ago

0.12.19-next.0

4 months ago

0.12.18

4 months ago

0.12.18-next.2

4 months ago

0.12.18-next.1

4 months ago

0.12.18-next.0

5 months ago

0.12.17

5 months ago

0.12.17-next.3

5 months ago

0.12.17-next.2

5 months ago

0.12.17-next.1

5 months ago

0.12.13-next.3

8 months ago

0.12.13-next.1

9 months ago

0.12.13-next.2

8 months ago

0.12.14-next.1

7 months ago

0.12.14-next.0

8 months ago

0.12.14-next.2

7 months ago

0.12.12-next.0

9 months ago

0.12.9-next.1

10 months ago

0.12.9-next.2

10 months ago

0.12.17-next.0

6 months ago

0.12.9

10 months ago

0.12.10

9 months ago

0.12.11

9 months ago

0.12.16

6 months ago

0.12.12

9 months ago

0.12.13

8 months ago

0.12.14

7 months ago

0.12.15

6 months ago

0.12.15-next.1

6 months ago

0.12.15-next.2

6 months ago

0.12.10-next.0

10 months ago

0.12.10-next.1

9 months ago

0.12.15-next.0

7 months ago

0.12.9-next.0

11 months ago

0.12.8-next.2

11 months ago

0.12.8-next.3

11 months ago

0.12.8

11 months ago

0.12.8-next.0

12 months ago

0.12.8-next.1

12 months ago

0.12.7-next.1

1 year ago

0.12.7-next.2

1 year ago

0.12.7

12 months ago

0.12.7-next.0

1 year ago

0.12.6

1 year ago

0.12.6-next.3

1 year ago

0.12.4

1 year ago

0.12.5

1 year ago

0.12.6-next.1

1 year ago

0.12.6-next.2

1 year ago

0.12.6-next.0

1 year ago

0.12.5-next.1

1 year ago

0.12.5-next.0

1 year ago

0.12.5-next.2

1 year ago

0.12.3-next.2

1 year ago

0.12.3-next.1

1 year ago

0.12.3

1 year ago

0.12.4-next.1

1 year ago

0.12.4-next.2

1 year ago

0.12.4-next.0

1 year ago

0.12.3-next.0

1 year ago

0.12.0

1 year ago

0.12.1

1 year ago

0.12.2

1 year ago

0.11.32

2 years ago

0.12.0-next.1

2 years ago

0.12.0-next.0

2 years ago

0.12.1-next.2

1 year ago

0.12.1-next.3

1 year ago

0.12.1-next.0

1 year ago

0.12.1-next.1

1 year ago

0.12.1-next.4

1 year ago

0.11.32-next.0

2 years ago

0.11.32-next.2

2 years ago

0.11.32-next.1

2 years ago

0.11.31

2 years ago

0.11.31-next.1

2 years ago

0.11.31-next.0

2 years ago

0.11.31-next.3

2 years ago

0.11.31-next.2

2 years ago

0.11.28-next.1

2 years ago

0.11.28-next.0

2 years ago

0.11.28-next.2

2 years ago

0.11.29-next.0

2 years ago

0.11.29-next.1

2 years ago

0.11.29-next.2

2 years ago

0.11.29-next.3

2 years ago

0.11.28

2 years ago

0.11.29

2 years ago

0.11.30

2 years ago

0.11.30-next.1

2 years ago

0.11.30-next.0

2 years ago

0.11.27

2 years ago

0.11.27-next.1

2 years ago

0.11.27-next.0

2 years ago

0.11.26

2 years ago

0.11.24

2 years ago

0.11.25

2 years ago

0.11.26-next.1

2 years ago

0.11.26-next.0

2 years ago

0.11.24-next.0

2 years ago

0.11.23

2 years ago

0.11.20

2 years ago

0.11.21

2 years ago

0.11.22

2 years ago

0.11.20-next.0

2 years ago

0.11.19

2 years ago

0.11.15

2 years ago

0.11.16

2 years ago

0.11.17

2 years ago

0.11.18

2 years ago

0.11.13

2 years ago

0.11.14

2 years ago

0.11.19-next.0

2 years ago

0.11.18-next.0

2 years ago

0.11.11

2 years ago

0.11.12

2 years ago

0.11.10

3 years ago

0.11.9

3 years ago

0.11.8

3 years ago

0.11.7

3 years ago

0.11.6

3 years ago

0.11.5

3 years ago

0.11.4

3 years ago

0.11.3

3 years ago

0.11.2

3 years ago

0.11.1

3 years ago

0.11.0

3 years ago

0.10.1

3 years ago

0.10.2

3 years ago

0.8.5

3 years ago

0.10.0

3 years ago

0.9.0

3 years ago

0.9.1

3 years ago

0.8.4

3 years ago

0.8.3

3 years ago

0.8.2

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.7

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.1-alpha.26

4 years ago

0.1.1-alpha.25

4 years ago

0.1.1-alpha.24

4 years ago

0.1.1-alpha.23

4 years ago