0.12.24 • Published 1 year ago

@backstage/plugin-cost-insights v0.12.24

Weekly downloads
533
License
Apache-2.0
Repository
github
Last release
1 year 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

1 year ago

0.12.23

1 year ago

0.12.23-next.1

1 year ago

0.12.23-next.0

1 year ago

0.12.22

1 year ago

0.12.21

1 year ago

0.12.20

1 year ago

0.12.20-next.2

1 year ago

0.12.20-next.1

1 year ago

0.12.20-next.0

1 year ago

0.12.19

1 year ago

0.12.19-next.3

1 year ago

0.12.19-next.2

1 year ago

0.12.19-next.1

1 year ago

0.12.19-next.0

1 year ago

0.12.18

1 year ago

0.12.18-next.2

1 year ago

0.12.18-next.1

1 year ago

0.12.18-next.0

1 year ago

0.12.17

1 year ago

0.12.17-next.3

1 year ago

0.12.17-next.2

1 year ago

0.12.17-next.1

1 year ago

0.12.13-next.3

2 years ago

0.12.13-next.1

2 years ago

0.12.13-next.2

2 years ago

0.12.14-next.1

2 years ago

0.12.14-next.0

2 years ago

0.12.14-next.2

2 years ago

0.12.12-next.0

2 years ago

0.12.9-next.1

2 years ago

0.12.9-next.2

2 years ago

0.12.17-next.0

1 year ago

0.12.9

2 years ago

0.12.10

2 years ago

0.12.11

2 years ago

0.12.16

1 year ago

0.12.12

2 years ago

0.12.13

2 years ago

0.12.14

2 years ago

0.12.15

1 year ago

0.12.15-next.1

1 year ago

0.12.15-next.2

1 year ago

0.12.10-next.0

2 years ago

0.12.10-next.1

2 years ago

0.12.15-next.0

2 years ago

0.12.9-next.0

2 years ago

0.12.8-next.2

2 years ago

0.12.8-next.3

2 years ago

0.12.8

2 years ago

0.12.8-next.0

2 years ago

0.12.8-next.1

2 years ago

0.12.7-next.1

2 years ago

0.12.7-next.2

2 years ago

0.12.7

2 years ago

0.12.7-next.0

2 years ago

0.12.6

2 years ago

0.12.6-next.3

2 years ago

0.12.4

2 years ago

0.12.5

2 years ago

0.12.6-next.1

2 years ago

0.12.6-next.2

2 years ago

0.12.6-next.0

2 years ago

0.12.5-next.1

2 years ago

0.12.5-next.0

2 years ago

0.12.5-next.2

2 years ago

0.12.3-next.2

2 years ago

0.12.3-next.1

2 years ago

0.12.3

2 years ago

0.12.4-next.1

2 years ago

0.12.4-next.2

2 years ago

0.12.4-next.0

2 years ago

0.12.3-next.0

2 years ago

0.12.0

2 years ago

0.12.1

2 years ago

0.12.2

2 years ago

0.11.32

3 years ago

0.12.0-next.1

2 years ago

0.12.0-next.0

3 years ago

0.12.1-next.2

2 years ago

0.12.1-next.3

2 years ago

0.12.1-next.0

2 years ago

0.12.1-next.1

2 years ago

0.12.1-next.4

2 years ago

0.11.32-next.0

3 years ago

0.11.32-next.2

3 years ago

0.11.32-next.1

3 years ago

0.11.31

3 years ago

0.11.31-next.1

3 years ago

0.11.31-next.0

3 years ago

0.11.31-next.3

3 years ago

0.11.31-next.2

3 years ago

0.11.28-next.1

3 years ago

0.11.28-next.0

3 years ago

0.11.28-next.2

3 years ago

0.11.29-next.0

3 years ago

0.11.29-next.1

3 years ago

0.11.29-next.2

3 years ago

0.11.29-next.3

3 years ago

0.11.28

3 years ago

0.11.29

3 years ago

0.11.30

3 years ago

0.11.30-next.1

3 years ago

0.11.30-next.0

3 years ago

0.11.27

3 years ago

0.11.27-next.1

3 years ago

0.11.27-next.0

3 years ago

0.11.26

3 years ago

0.11.24

3 years ago

0.11.25

3 years ago

0.11.26-next.1

3 years ago

0.11.26-next.0

3 years ago

0.11.24-next.0

3 years ago

0.11.23

3 years ago

0.11.20

3 years ago

0.11.21

3 years ago

0.11.22

3 years ago

0.11.20-next.0

3 years ago

0.11.19

3 years ago

0.11.15

3 years ago

0.11.16

3 years ago

0.11.17

3 years ago

0.11.18

3 years ago

0.11.13

3 years ago

0.11.14

3 years ago

0.11.19-next.0

3 years ago

0.11.18-next.0

3 years ago

0.11.11

3 years ago

0.11.12

3 years ago

0.11.10

4 years ago

0.11.9

4 years ago

0.11.8

4 years ago

0.11.7

4 years ago

0.11.6

4 years ago

0.11.5

4 years ago

0.11.4

4 years ago

0.11.3

4 years ago

0.11.2

4 years ago

0.11.1

4 years ago

0.11.0

4 years ago

0.10.1

4 years ago

0.10.2

4 years ago

0.8.5

4 years ago

0.10.0

4 years ago

0.9.0

4 years ago

0.9.1

4 years ago

0.8.4

4 years ago

0.8.3

4 years ago

0.8.2

4 years ago

0.8.1

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.7

4 years ago

0.5.6

4 years ago

0.5.5

4 years ago

0.5.4

4 years ago

0.5.3

4 years ago

0.5.2

4 years ago

0.5.1

4 years ago

0.5.0

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.1-alpha.26

5 years ago

0.1.1-alpha.25

5 years ago

0.1.1-alpha.24

5 years ago

0.1.1-alpha.23

5 years ago