docs(metrics): präzisiere sse_events_published_total Beschreibung (Audit #67)#119
Conversation
…dit #67) Der Counter wird im Subscriber-Loop pro publish()-Event pro aktivem Subscriber inkrementiert — semantisch also "delivered to subscriber", nicht "published once" wie der Name vermuten lässt. Audit #67 hatte das als irreführend markiert. Name bleibt aus Gründen der Grafana-Dashboard-Kompatibilität, Description+Code-Comment klären die Semantik nun. Refs #67 Audit-Punkt: "PR #65 — events.py:208 — sse_events_published_total inflation" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! Diese Änderung korrigiert die irreführende Dokumentation des 'sse_events_published_total' Counters. Da der Name aus Gründen der Abwärtskompatibilität mit bestehenden Grafana-Dashboards beibehalten werden muss, wurde die Beschreibung angepasst, um die tatsächliche Zählweise – ein Inkrement pro Subscriber pro Publish – präzise abzubilden. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the description and adds explanatory comments to the sse_events_published_total metric in backend/app/api/routes/events.py to clarify its behavior. The review feedback suggests using standard German umlauts instead of digraphs in the comments to maintain consistency with the rest of the codebase.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| # Inkrementiert pro SSE-Subscriber, nicht pro publish()-Call: ein | ||
| # publish() mit N aktiven Clients erhoeht den Counter um N. Der | ||
| # Metric-Name ist aus historischen Gruenden behalten (Grafana- | ||
| # Dashboards) — semantisch ist es "delivered to subscriber", | ||
| # nicht "published once" (siehe Audit #67 Hinweis). |
There was a problem hiding this comment.
Für eine konsistente Schreibweise im gesamten Projekt sollten echte deutsche Umlaute (ö, ü) anstelle von Umlaut-Ersatzzeichen (oe, ue) verwendet werden, da diese auch in anderen Dateien wie config.py (z. B. „gelöscht“, „beschränkt“) standardmäßig genutzt werden.
| # Inkrementiert pro SSE-Subscriber, nicht pro publish()-Call: ein | |
| # publish() mit N aktiven Clients erhoeht den Counter um N. Der | |
| # Metric-Name ist aus historischen Gruenden behalten (Grafana- | |
| # Dashboards) — semantisch ist es "delivered to subscriber", | |
| # nicht "published once" (siehe Audit #67 Hinweis). | |
| # Inkrementiert pro SSE-Subscriber, nicht pro publish()-Call: ein | |
| # publish() mit N aktiven Clients erhöht den Counter um N. Der | |
| # Metric-Name ist aus historischen Gründen behalten (Grafana- | |
| # Dashboards) — semantisch ist es "delivered to subscriber", | |
| # nicht "published once" (siehe Audit #67 Hinweis). |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #119 +/- ##
==========================================
- Coverage 89.26% 89.24% -0.03%
==========================================
Files 91 91
Lines 4257 4257
Branches 369 369
==========================================
- Hits 3800 3799 -1
- Misses 359 360 +1
Partials 98 98
... and 1 file with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
## <small>0.10.2 (2026-06-15)</small> * refactor(main): _resolve_model_id_from_config nimmt PrinterYAMLConfig statt Any (#67) (#123) ([2ff51d2](2ff51d2)), closes [#67](#67) [#123](#123) [#67](#67) [#59](#59) [#67](#67) [#59](#59) * refactor(snipeit): typisiere response payload als TypedDict statt dict[str, Any] (#67) (#122) ([e88601b](e88601b)), closes [#67](#67) [#122](#122) [#67](#67) [#67](#67) [#51](#51) * perf(lifespan): plugin-discovery in Thread auslagern (Audit #67) (#121) ([48215b4](48215b4)), closes [#67](#67) [#121](#121) [#67](#67) [#59](#59) * fix(config): stricter validation for log_level + webhook_api_key (#46) (#116) ([6b8ac30](6b8ac30)), closes [#46](#46) [#116](#116) [#46](#46) [#46](#46) [#46](#46) [#46](#46) [#116](#116) * fix(print): copies-replication erzeugt UNIQUE job_ids (Round 2 #hangar-109) (#120) ([bd781ae](bd781ae)), closes [#hangar-109](https://github.com/strausmann/label-printer-hub/issues/hangar-109) [#120](#120) [#115](#115) * fix(print): PrintOptions.copies replicates images for hardware print (#hangar-109) (#115) ([d27bbcc](d27bbcc)), closes [#hangar-109](https://github.com/strausmann/label-printer-hub/issues/hangar-109) [#115](#115) [strausmann/hangar#109](https://github.com/strausmann/hangar/issues/109) * docs(metrics): präzisiere sse_events_published_total Beschreibung (Audit #67) (#119) ([ab8c4c4](ab8c4c4)), closes [#67](#67) [#119](#119) [#67](#67) [#67](#67) [#65](#65) * docs(ptouch): korrigiere Tape-Klassen-Namen in ptouch-integration.md (Audit #67) (#118) ([0faab99](0faab99)), closes [#67](#67) [#118](#118) [#67](#67) [#59](#59) * chore(readme): codecov badge ohne embedded Token (Audit #67) (#117) ([4bb5423](4bb5423)), closes [#67](#67) [#117](#117) [#67](#67) [#59](#59) [skip ci]
Summary
Der
printer_hub_sse_events_published_totalCounter wird im Subscriber-Loop pro publish()-Event pro aktivem Client inkrementiert — alsoNmal pro publish bei N Clients. Der Metric-Name suggeriert "1 pro publish" — Audit #67 hatte das als irreführend markiert.Name bleibt wegen Grafana-Dashboard-Kompatibilität. Description + Code-Comment klären die Semantik jetzt:
Test plan
/metrics-Endpoint zeigt die neue HELP-ZeileRefs #67 Audit-Punkt:
PR #65 — events.py:208 — sse_events_published_total inflation