DORA metrics Prometheus exporter - polls Woodpecker and Forgejo APIs
  • Python 99.1%
  • Dockerfile 0.9%
Find a file
Lucas Draney 4b24a975c3
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
test: add coverage for missing finished_at key in pipeline data (#10)
2026-06-14 11:32:31 +00:00
docs docs: ArgoCD CFR spike decision record (#6) (#8) 2026-06-13 20:05:41 +00:00
src feat: add MTTR failure event detection (#9) 2026-06-14 01:44:25 +00:00
tests test: add coverage for missing finished_at key in pipeline data (#10) 2026-06-14 11:32:31 +00:00
.gitignore Add DORA metrics exporter service (#1) 2026-03-02 05:33:57 +00:00
.woodpecker.yaml fix: update pipeline to Woodpecker v3 format + kaniko 2026-03-02 08:52:19 +00:00
Dockerfile Add DORA metrics exporter service (#1) 2026-03-02 05:33:57 +00:00
README.md chore: trigger initial CI build 2026-03-02 08:51:24 +00:00
requirements.txt Add tier label to all Prometheus metrics (#3) 2026-06-13 20:05:38 +00:00
tiers.yaml Add tier label to all Prometheus metrics (#3) 2026-06-13 20:05:38 +00:00

pal-e-dora-exporter

DORA metrics Prometheus exporter. Polls Woodpecker CI and Forgejo APIs, exposes metrics at /metrics for Prometheus scraping.

Metrics

Metric Type Labels Description
dora_deployments_total Counter repo, status, event Pipeline deployment count
dora_deployment_duration_seconds Histogram repo Pipeline duration (created to finished)
dora_deployment_last_success_timestamp Gauge repo Unix timestamp of last successful pipeline
dora_pr_merges_total Counter repo Merged pull request count
dora_pr_lead_time_seconds Histogram repo PR lead time (created to merged)
dora_pr_review_count Histogram repo Review count per merged PR

Endpoints

  • GET /health -- 200 OK liveness probe
  • GET /metrics -- Prometheus metrics

Configuration

All configuration via environment variables:

Variable Required Default Description
WOODPECKER_URL yes Woodpecker API base URL
WOODPECKER_TOKEN yes Woodpecker API Bearer token
FORGEJO_URL yes Forgejo instance URL
FORGEJO_USER yes Forgejo username
FORGEJO_PASSWORD yes Forgejo password
POLL_INTERVAL no 60 Seconds between collection cycles

Run Locally

pip install -r requirements.txt \
    --extra-index-url https://forgejo.tail5b443a.ts.net/api/packages/forgejo_admin/pypi/simple/

export WOODPECKER_URL=https://woodpecker.tail5b443a.ts.net
export WOODPECKER_TOKEN=...
export FORGEJO_URL=https://forgejo.tail5b443a.ts.net
export FORGEJO_USER=forgejo_admin
export FORGEJO_PASSWORD=...

uvicorn src.main:app --host 0.0.0.0 --port 8000

Docker

docker build -t dora-exporter .
docker run -p 8000:8000 \
    -e WOODPECKER_URL=... \
    -e WOODPECKER_TOKEN=... \
    -e FORGEJO_URL=... \
    -e FORGEJO_USER=... \
    -e FORGEJO_PASSWORD=... \
    dora-exporter

CI

Woodpecker pipeline builds and pushes to Harbor on push to main. Image: harbor.tail5b443a.ts.net/pal-e-dora-exporter/dora-exporter.

Architecture

Woodpecker API ---+
                  +--> pal-e-dora-exporter --> /metrics --> Prometheus --> Grafana
Forgejo API ------+         (k8s pod)           :8000        (scrape)      (dashboard)