Skip to content

refactor(metrics): use instance-based design#470

Merged
danroc merged 1 commit intomainfrom
refactor/instance-based-metrics
Feb 26, 2026
Merged

refactor(metrics): use instance-based design#470
danroc merged 1 commit intomainfrom
refactor/instance-based-metrics

Conversation

@danroc
Copy link
Owner

@danroc danroc commented Feb 26, 2026

Move all Prometheus collectors and registry from package-level globals into PrometheusCollector struct fields. Initialization moves from init() to NewCollector(), Handler() becomes a method, and Reset() is removed since tests now create isolated collector instances.

Move all Prometheus collectors and registry from package-level globals
into PrometheusCollector struct fields. Initialization moves from
init() to NewCollector(), Handler() becomes a method, and Reset() is
removed since tests now create isolated collector instances.
@danroc danroc merged commit 743d6e4 into main Feb 26, 2026
4 checks passed
@danroc danroc deleted the refactor/instance-based-metrics branch February 26, 2026 22:29
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 99.18699% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.00%. Comparing base (707df91) to head (1ecab3b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/geoblock/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #470      +/-   ##
==========================================
+ Coverage   90.08%   91.00%   +0.91%     
==========================================
  Files          12       12              
  Lines         686      756      +70     
==========================================
+ Hits          618      688      +70     
  Misses         62       62              
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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