Docs/Tools/Incidents

Incidents

What are Incidents?

In DevStats, an incident represents a critical production failure that required immediate remediation, such as a hotfix or a service disruption. Tracking incidents accurately is essential for calculating two key DORA metrics: Mean Time to Recovery (MTTR) and Change Failure Rate (CFR).

How It Works

DevStats offers the methods below to track incidents. To calculate MTTR and CFR, it uses the configured source: Git Provider or recorded incidents. The API and manual incident management can be used together.

Method How it works Best for
Branch prefix Automatically detects branches with prefixes like hotfix/ or bugfix/ from your Git provider Teams that follow branch naming conventions
PR Rollback Automatically detects Revert PRs merged into the deploy branch as incidents Teams using the native Revert button from their Git provider
Incident Management UI Incidents logged manually via the DevStats interface, either as past resolved incidents or active real-time tracking Teams without external incident tools
API Incidents submitted programmatically from an external tool via the DevStats Incidents API Teams with existing incident management workflows
Datadog Automatically syncs incidents from your Datadog account via API Teams using Datadog as their incident management platform

What data is tracked per incident

Field Description
Name Incident name
Description What happened
Repository The affected repository
started_at When the incident began (ISO 8601)
resolved_at When it was resolved (ISO 8601) — if null, incident is considered active
detected_by How it was detected: automated monitoring, customers, or internal

How incidents affect your metrics

For recorded incidents, MTTR is calculated as the average of resolved_at - started_at. With Git Provider, DevStats estimates the recovery interval from PRs and deployments. Active incidents with no resolved_at are excluded until resolved. The more incidents you track and resolve, the more accurate your MTTR becomes.

Change Failure Rate counts PRs classified as hotfix/bug, rollback PRs, or recorded incidents, depending on the configuration. See DORA Metrics for the full CFR calculation.

Track Incidents