Skip to content

fix(metrics): export every labelled series from startup; release 0.1.1 - #13

Merged
Odrec merged 2 commits into
mainfrom
fix/metrics-series-at-startup
Nov 3, 2026
Merged

Odrec merged 2 commits into
mainfrom
fix/metrics-series-at-startup

Conversation

@Odrec

@Odrec Odrec commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

What

prometheus_client emits a labelled series only after its first observation. A freshly started adapter therefore exported no ocr_documents_total, ocr_pages_total, ocr_errors_total or ocr_page_seconds at all, and the Grafana panels built on them showed "No data" instead of zero until the next document. In practice that is most of the time: the hosts reboot for kernel updates every few days and OCR traffic is sporadic.

Metrics.__init__ now creates the children for every known label value: the two page sources, the document statuses a run can end in, and every AdapterError type. A restart shows as a counter reset rather than a gap.

Release

The second commit is the 0.1.1 release: version, CHANGELOG section, README and example pins, uv.lock. After the merge, tag v0.1.1 on main to build and push the image.

🤖 Generated with Claude Code

Renato Garita Figueiredo added 2 commits November 3, 2026 21:54
prometheus_client emits a labelled series only after its first
observation. A freshly started adapter therefore exported no
ocr_documents_total, ocr_pages_total, ocr_errors_total or
ocr_page_seconds at all, and the Grafana panels built on them showed
"No data" instead of zero until the next document -- in practice most
of the time, since the hosts reboot for kernel updates every few days
and OCR traffic is sporadic.

Create the children for every known label value in Metrics.__init__:
the two page sources, the document statuses a run can end in, and
every error type.
@Odrec
Odrec merged commit 470498f into main Nov 3, 2026
1 check passed
@Odrec
Odrec deleted the fix/metrics-series-at-startup branch November 3, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant