Last updated Oct 27, 2022

Rate this page:

What are derived metrics?

Derived metrics make calculating metric values simple. Instead of pushing the metric values through the Compass API, or publishing them from a Forge app, derived metric values are automatically calculated based on the events received for your Compass component.

For example, the Deployment Frequency metric is derived from deployment events. As you ingest deployment events on your component, you'll see the metric automatically recalculate.

Available derived metrics

Only built-in metric definitions can be derived from events. Custom metrics must still be updated manually.

Metric NameDerived Event Types
MTTRIncidents
Deployment FrequencyDeployments
Build Success RateBuilds
Deployment TimeDeployments
Build TimeBuilds

Create a derived metric source

When you connect one of the above metrics to a component via the UI, it’s automatically derived based on events.

You can't push values to derived metrics manually, they are only calculated based on events on that component.

To create a derived metric source via the API, supply the derived: true option in your CreateMetricSource input. For example:

1
2
{
	"input": {
		"componentId": <your component ID>
		"metricDefinitionId": "ari:cloud:compass::metric-definition/builtin/weekly-deployment-frequency-28d",
		"externalMetricSourceId": "test123",
		"url": "https://google.com",
		"derived": true
	}
}

Update a derived metric source

To update the value of a derived metric, you must push a new event to that component, either through the API or an integration.

In addition, derived metrics will be automatically recalculated by Compass once an hour. As an example, if you stop sending Deployment Events to a component, you should see your derived Deployment Frequency metric drop over time, without any additional input.

Rate this page: