Docs/Use Cases/Tracking incidents

Tracking incidents

Overview

DevStats can automatically detect and calculate Change Failure Rate by linking deployments and incidents through your existing workflows. Teams can adapt this process based on their current level of automation and development practices.

Using Branch Prefixes

If your team uses branch naming patterns, DevStats can automatically detect and classify production fixes based on the selected prefixes. In the Settings → Incidents tab, you can configure the Incident Settings to define which prefixes represent production recovery branches.

Teams can choose to track:

  • Both hotfix + bugfix,
  • Only hotfix, or
  • Only bugfix.

These prefixes help DevStats recognize when a deployment was triggered to resolve an issue or defect, providing a simple and consistent way to detect production-related failures.

You can also apply these prefix rules to all repositories or select specific repositories, giving teams flexibility to align tracking with their deployment structure.

bugfix and hotfix serve different purposes: a bugfix addresses minor issues for upcoming releases, while a hotfix targets critical production problems requiring immediate deployment. Only hotfixes should be counted as incidents.

Managing Incidents in DevStats

Teams can manage incidents either automatically via the Incidents API or manually through Incident Management, depending on their workflow and automation level. Both options ensure accurate and traceable data for Change Failure Rate and MTTR calculations.

For teams with automated pipelines, the Incidents API can be used to register incidents programmatically and associate them with specific deployments. This enables real-time tracking of failures and resolutions, providing more precise and up-to-date Change Failure Rate calculations.

If automation is not yet in place, incidents can also be created manually in Incident Management. In this case, teams can assign incidents to the relevant product or feature team, maintaining accountability and transparency for production fixes.

Distinguishing Fix Types

It’s important to distinguish between a simple fix and a hotfix. A simple fix addresses a minor issue or bug that doesn’t impact production or can wait for the next release cycle, while a hotfix targets a critical production defect that requires immediate deployment. Only the latter should be counted toward the Change Failure Rate, as it reflects an incident affecting end users or system reliability.

Summary Table

Method Description Best For Notes
Branch Prefixes (hotfix, bugfix) DevStats automatically detects branches with these prefixes to classify deployments that fix previous issues. Teams following consistent Git naming conventions. Ideal for simple automation without additional setup. Helps distinguish between routine fixes and critical hotfixes.
Incidents API Incidents are reported to DevStats via API calls, which inform the platform about failures and their related deployments. Teams with CI/CD automation or monitoring systems. Enables continuous tracking of failures and recovery times. Recommended for mature teams seeking precise, automated data.
Incident Management (Manual) Incidents are declared manually in the DevStats dashboard. Teams without automation or early in DORA adoption. Allows manual incident entry and assignment to the responsible product or feature team for accountability.