pac-metrics-watch is a standalone debugging tool for Pipelines-as-Code
metrics. It scrapes the PAC controller and watcher metrics endpoints through
kubectl, combines the useful PAC signals, and presents them as either:
- an interactive TUI dashboard
- a one-shot report with
--once
The default dashboard focuses on the metrics that are most helpful when debugging PAC behavior:
- Git provider API requests
- PipelineRuns created
- Running PipelineRuns
- PipelineRun duration
- Workqueue pressure
- Controller-runtime reconcile health
recording-20260320-11h14.mp4
Build the tool with:
makeThis writes the binary to:
bin/pac-metrics-watchAlways run the built binary from bin/:
./bin/pac-metrics-watchUseful variants:
./bin/pac-metrics-watch -endpoint controller
./bin/pac-metrics-watch --once
./bin/pac-metrics-watch --once -output tsvThe tool scrapes PAC through the Kubernetes service proxy:
pipelines-as-code-controller:9090pipelines-as-code-watcher:9090
The default scope is all, which combines controller and watcher metrics.
This is the default view. It groups the most important PAC metrics into:
- PAC Flow
- Queue Health
- Reconcile Health
Each row includes:
- current value
- recent delta
- short trend sparkline
- a short explanation of why the signal matters
Raw view exposes the underlying metric families for deeper inspection. It keeps the fast navigation, sorting, and filtering from the original tool.
d: dashboard viewr: raw viewtab: switch scope betweenall,controller, andwatcherj/kor arrow keys: move selectionf: PAC-only filter in raw views: change raw sort mode/: filter raw metric namesq: quit
Use --once to print a single report and exit:
./bin/pac-metrics-watch --onceThis is useful for quick checks, scripting, or capturing a single PAC metrics snapshot without opening the full TUI.
Run:
go test ./...Install the local hooks with:
pre-commit installThen run them manually with:
pre-commit run --all-filesThis directory includes a standalone Goreleaser config:
goreleaser release --cleanFor a local dry run:
goreleaser build --snapshot --clean