DORA Metrics Setup in PanDev Metrics
TL;DR. Turn on Enable DORA Metrics in DORA → Settings and list your production branches: PanDev Metrics starts counting deployments from merges into them. For exact numbers, add the snippet from DORA → Connection to the production deploy job of your CI — then every real deployment is reported to PanDev Metrics as an event. Audience: admin.
Where deployments come from
PanDev Metrics learns about deployments in two ways:
| Source | What counts as a deployment | Setup |
|---|---|---|
| Merges (default) | A merge into a production branch | A git integration with a webhook and the list of production branches |
| Deployment events | A deployment your CI or CD reports to the ingest URL | A snippet in the deploy job |
Merges work out of the box but are an approximation: a merge is not a rollout, and its success or failure is unknown. Events describe the real rollout — when it finished, whether it failed, which commits it shipped. The first event for a service switches that service to events automatically; services that send nothing keep being counted by merges.
DORA settings apply to the whole company, not to one department.
Before you begin
- PanDev Metrics is up and running (Cloud workspace or on-prem instance)
- Admin access to your PanDev Metrics tenant
- A git integration with a webhook: GitLab, GitHub, Bitbucket or Azure DevOps
- For deployment events — access to the CI/CD configuration of the services you deploy
Step 1 — Turn on DORA
- In the sidebar, open DORA → Settings.
- Turn on Enable DORA Metrics. The switch applies immediately.
- Check the calculation fields — they are used while a service sends no events:
| Field | What it means |
|---|---|
| Production branches | A merge into any of these branches counts as a production deployment. Comma-separated, default prod,production,master,main |
| Feature branch prefix | Prefix of task branches, for example feature/ |
| Bug branch prefix | Prefix of bug-fix branches, for example bugfix/ |
| Hotfix branch prefix | Prefix of urgent production fixes, for example hotfix/. A production deployment from such a branch counts as a failed change |
- Click Save.
When DORA is turned on, PanDev Metrics indexes the last 90 days of GitLab history, so the dashboard is not empty on day one. Progress is shown in the Indexing DORA card. For GitHub, Bitbucket and Azure DevOps there is no history import: metrics accumulate from the moment the integration is connected.
Step 2 — Send deployment events from CI
This step is optional, but without it the metrics stay an approximation built from merges.
- Open DORA → Connection. The page shows the Ingest URL and the Ingest token.
- Pick your system on the tabs: GitLab CI, GitHub Actions, Argo CD, Jenkins, Azure Pipelines or Any script.
- Copy the snippet. The real token is already filled in, so the snippet works as is. If the Ingest token shows that its value cannot be read, the token has to be replaced: the snippet then holds a placeholder. The text above the snippet says where to put it — for GitLab CI, for example, into the job in
.gitlab-ci.ymlthat deploys to production. - Move the token into a CI secret instead of keeping it in the pipeline file: in GitLab — Settings → CI/CD → Variables (masked, protected), in GitHub — a repository secret.
- Run the deploy job.
One ingest token is enough for any number of pipelines. It can only report deployments and gives no access to product data.
:::tip Lead time needs the commit history
Lead time is measured from commit timestamps, so the deploy job must see the git history: GIT_DEPTH: 0 in GitLab CI, fetch-depth: 0 in actions/checkout in GitHub Actions, checkout: self with fetchDepth: 0 in Azure Pipelines. Argo CD only knows the revision of the manifests repository, so its events give no lead time — send events from CI for that.
:::
Minimal event
For a script, one command after a successful deployment is enough:
curl -sS --max-time 30 -X POST https://pandev.example.com/v1/dora/ingest/deployments \
-H "Authorization: Bearer $PANDEV_DORA_TOKEN" \
-H "Content-Type: application/json" \
-d '{"eventId":"payments-api-4f2c9e1","service":"my-group/payments-api","environment":"production","status":"success","finishedAt":"2026-11-21T10:04:37Z","commitSha":"4f2c9e1"}'
Replace https://pandev.example.com with the Ingest URL from the DORA → Connection page.
| Field | Required | What it does |
|---|---|---|
service | Yes | What was deployed. Must match a repository PanDev Metrics already knows: by repository.projectId, then repository.url, then the full repository path in this field (my-group/payments-api) |
environment | Yes | Where it was deployed. By default only production and prod count as production — see Production environments. Events to other environments are stored but do not affect the metrics |
status | Yes | success, failure, rolled_back, in_progress or canceled. Statuses build the change failure rate and time to restore |
finishedAt | For a finished deployment | When the deployment finished, ISO-8601 with a time zone: 2026-11-21T10:04:37Z |
commitSha | No | The commit that reached production — lead time is measured from it |
commits, commitTimes | No | The deployment contents: lead time is measured per commit, and commitTimes works even without a connected repository |
repository | No | Provider, URL and project ID — the most reliable way to point at the repository |
eventId | No | The source's event ID. A repeat with the same ID creates no duplicate, so the pipeline may retry freely |
The Connection page lists all fields with explanations. Limits: up to 100 events per request and 1 MB per body, up to 1000 commits per deployment, events no older than 730 days and no more than 5 minutes in the future. Besides Authorization: Bearer, the token is accepted in the X-PanDev-Token and X-Gitlab-Token headers and as the password of HTTP Basic authentication (for Azure DevOps service hooks).
Production environments
Which environments count as production is set by the company setting DORA_PRODUCTION_ENVIRONMENTS: production and prod by default. The match is exact and case-insensitive, so prd, live or prod-eu are stored but stay out of the metrics.
The simplest fix is to send environment: production from the deploy job. If your environments have other names, a company administrator can replace the list through the API — there is no screen for it yet:
curl -X PATCH https://pandev.example.com/api/v1/settings \
-H "Authorization: Bearer $PANDEV_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"data": {"settings": {"DORA_PRODUCTION_ENVIRONMENTS": "production,prod,prd,live"}}}'
The value replaces the whole list, so keep the names already in it — production and prod by default. An empty value does not turn production off: it switches to the name rule, under which production means production, prod, prd, live or names like prod-eu and eu-prod without a non-production marker such as pre, test, stage, dev or qa. A non-empty list replaces the name rule, so when filling an empty setting, list every production environment. Whether an event is production is decided when it is received. The change applies to new events only: stored events are not recalculated, even when re-sent.
How the metrics are counted
- Deployment frequency — production deployments per period.
- Lead time for changes — the median time from a commit to its deployment.
- Change failure rate — the share of failed production deployments: by events —
failureandrolled_back; by merges — deployments from fix branches. - Time to restore service — by events, from a failed deployment to the next successful one; by merges, from the task of the failure to the merge of its fix.
Deployments are recorded as soon as they arrive, but the dashboard figures are recalculated every night, so today's deployments appear on the cards the next morning. How to read the numbers — in DORA metrics.
Verify
- Open DORA → Event log.
- Find the event of your deployment: the Outcome column should say Accepted.
- Click the row to see the event body and, for a rejected event, the reason.
To check the token without sending an event, call GET /v1/dora/ingest/ping with the token: the response shows the tenant and the token's permissions.
Troubleshooting
The deploy job gets 401
The token is missing or revoked. Send it in the Authorization: Bearer header and check the CI variable is available to the deploy job — protected variables in GitLab are only passed to protected branches and tags.
The event is Rejected: no repository with this name
PanDev Metrics accepts events only for repositories it already knows. Connect the repository through the git integration, or send repository.projectId / repository.url, or name service by the full repository path, for example team/api.
The event is Not counted
The environment is not in the company's list of production environments. By default the list holds only production and prod. If the environment is production — for example prd, live or prod-eu — send a name from the list, such as production, or have a company administrator add it to the list, keeping the names already in it, as described in Production environments. If the setting is empty, the environment does not match the name rule: send a matching name, or have a company administrator list every production environment. Stored events are not recalculated, even when re-sent.
Events are rejected with "DORA is disabled"
Turn on Enable DORA Metrics in DORA → Settings.
Deployments are counted, but lead time is empty
The deploy job does not see the commit history, or the events come from Argo CD. See the tip in Step 2.
Indexing finished with errors
Some GitLab repositories could not be read. Check the GitLab token permissions, then turn DORA off and on again.
Related
- Guide: DORA metrics
- How-to: GitLab integration
- How-to: GitHub integration