Preview

Overview and delivery metrics

What the Overview's delivery, incident and agent numbers mean, how each is worked out from facts Wardn records, which range and filters apply, and how fresh they are.

The Overview shows how delivery is going: how often you ship, how long a change takes to reach production, how often a release goes wrong, and how long it takes to recover. Beside those it shows how many incidents a release caused and what your agents did. Every number is worked out from facts: small records of things that happened, written when they happened, that are never edited afterwards. This page says what each number counts, so you can check it against your own records.

What is built

Preview. The numbers are served by three API operations, described below. The Overview screen reads them as it is moved off its sample data; until then, the API is the way to read them. Deploys are recorded as facts too, but no Overview number reads them yet.

Where the numbers come from

Wardn writes a fact in the same database transaction as the change it describes. A release that lands and the fact that it landed are stored together or not at all, so no fact is missing and none describes something that did not happen. The facts are:

FactWritten when
Release landedA release (not a rollback or a restore) completes, once for each environment it went to
Release rolled backA rollback release completes, once for each environment, naming the release it undid
Release failedA release fails, once for each environment where a deployment failed (or each it went to, when none is to blame by name)
Deploy applied, deploy failedA cluster answers a command to apply a snapshot: it took it, or refused or failed it
Incident openedAn incident opens, at the time it began, with its severity and the release that caused it when Wardn knows one
Incident resolvedAn incident is resolved, with the time it opened
Commit first seenA snapshot is the first in the organization to hold a commit, at the time Wardn first saw it
Agent actionAn agent calls a tool, a person decides a proposal, or a recommendation is taken, ignored or overruled

A cancelled release is neither landed nor failed, and a restore is not a release of new work, so neither leaves a fact.

A worker then loads each fact into the analytics store. It is a separate schema of the same Postgres database, with the facts split by month, read only through one interface, so it can be replaced without changing anything that uses it. Loading never holds up the change: facts wait in the outbox if the store is slow or down, however long that lasts, and are loaded when it works, each exactly once. A fact that arrives twice is stored once, because its identity is fixed when it is made.

The numbers you read are rollups of the facts: totals for each hour and each day, for each organization, environment and team. The leader process works out the hours that new facts landed in about once a minute, so a number is at most a minute or two behind. Because a read only adds up a few hundred rollup rows, it takes the same time after a year of history as after a week. Facts are kept for a little over two years; rollups are kept without end. A rollup can always be worked out again from its facts, and doing so gives the same totals.

The delivery numbers

GET /overview/delivery returns the four measures of delivery and a chart of the last 14 days.

curl -fsS "$WARDN_API_URL/api/v1/overview/delivery?days=7" -H "Authorization: Bearer $WARDN_TOKEN"
curl -fsS "$WARDN_API_URL/api/v1/overview/delivery?days=30&environment=staging&teamId=payments&teamId=billing" -H "Authorization: Bearer $WARDN_TOKEN"

Deployment frequency

landed is the number of releases that landed in the range, and perDay is that number divided by the days in the range. A release counts when its status becomes completed, in the environment it went to. A rollback does not count as landing, and a release that landed in two environments counts once in each. Several deployments in one release are one release.

Lead time

leadTimeSeconds is the mean time from the first commit of a release being seen to the release landing. For each landed release Wardn takes the commits of the snapshot it moved, finds the earliest time any of them was first seen, and measures to the moment the release landed. "Seen" is when the first snapshot holding the commit was made, which is when Wardn learned of it from a push or a poll, not the commit's own timestamp. A release with no known commit (a snapshot rendered from no repository) has no lead time and is left out of the mean. When no release in the range has one, leadTimeSeconds is null. It is a mean, so one slow release moves it; the median is not available.

Change failure rate

failed counts the releases that failed plus the rollbacks that completed, and attempts counts the releases that landed plus those that failed. failureRate is failed divided by attempts, from 0 to 1, and is 0 when nothing was attempted. For example, five releases landed, one failed and one was rolled back: two of six, a rate of 0.33. A rollback is counted as a failure of the release it undid and not as an attempt of its own.

Time to restore

timeToRestoreSeconds is the mean time from an incident opening to its resolution, for the incidents in the range that were resolved in it and that a release caused. An incident belongs to a release when it was raised from that release (a wave that failed its checks, a release that failed) or when a person linked it. An incident with no cause release is left out here: the incident numbers below count all of them. When none was resolved in the range, it is null.

The deploys chart

chart has one entry for each of the last 14 days, oldest first, every day present with zeros where nothing happened: the releases that landed and the releases that rolledBack that day. Days are whole UTC days, and today is the last, partly complete, day. The chart always shows 14 days, whatever days says.

The incident numbers

GET /overview/incidents returns the incident numbers over days days, 30 by default.

FieldMeaning
openedIncidents that opened in the range
causedByReleaseOf those opened, how many a release caused. This is the "3 of 5" on the Overview
resolvedIncidents resolved in the range, whenever they opened
meanTimeToRestoreSecondsThe mean time from opening to resolution of the incidents resolved in the range, all of them, whatever caused them. null when none was resolved

An incident is placed in the environment it affects, a production one when it affects any, and in the team that owns the first app of what it affects, or of the release that caused it. Where neither is known the incident has no team. A team filter counts only incidents with that team, so the response says how many incidents were left out for having none: withoutTeam is the number opened in the period with no team, 0 when you do not filter by team. An incident that was open when you read is counted as opened but has no time to restore yet.

The agent numbers

GET /overview/agents returns what agents did over days days, 7 by default. Agents belong to the organization, so no environment or team narrows it.

FieldMeaning
actionsTool calls agents made, whether they ended done or proposed
overruled, overruledShareProposals and recommendations a person overruled, and their share of actions
autoApprovedProposals that a rule approved with no person deciding. A change that the rules do not allow to run unattended is never counted here
recommendations, taken, takenShareRecommendations that were decided, how many were taken, and their share

Range and filters

ParameterApplies toMeaning
daysAll threeHow many whole UTC days back to count, today included: 1 to 90. The defaults are 7 for delivery, 30 for incidents and 7 for agents. A value outside 1 to 90 is refused
environmentIdDelivery, incidentsAn environment's id. Left out, the numbers are for production, meaning every environment whose class is production
teamIdDelivery, incidentsA team's id; repeat it for several. Only the work of those teams counts. A fact belongs to the team that owns the first app of what moved

Environments are matched by id, so renaming one does not split its history: the facts keep the name they were written under, and the filter follows the id.

Permissions

OperationNeeds
GET /overview/deliveryrelease:read
GET /overview/incidentsincident:read
GET /overview/agentsagent:read

The Overview is the page everyone lands on, so a person who holds the permission only in some places still sees it, over those places. Someone who holds it for the whole organization sees the whole organization. Someone who holds it on some teams or environments sees the work of those teams and what happened in those environments, and scoped in the response is true; they never see another team's counts. A grant on an app, a cluster or a deployment names neither a team nor an environment, so on its own it gives an empty slice, not an error. A person who holds the permission nowhere is refused. Agent numbers are organization-wide and need agent:read for the organization. See Roles and grants.

Limits to know

  • The numbers are as fresh as the last rollup, about a minute, and as complete as the facts loaded. If the analytics store was down, facts wait and the numbers catch up when it is back.
  • Lead time starts when Wardn first sees a commit. A repository connected today has no history before today.
  • Facts are not written backwards. Releases, incidents and agent actions from before this feature have none, so the first weeks of a new install show less than the truth.
  • Rollups are by environment name and team id, as above, and by day in UTC; there is no per-organization time zone for them.

Next

On this page