Skip to content

Conversation

@nezlobnaya
Copy link
Contributor

Summary
Replaced the panic-prone global registration in the metrics package with a defensive register-or-reuse pattern and log unexpected registration errors instead of panicking.
The defensive approach preserves the normal runtime behaviour (single registration) while making tests and multi-import scenarios resilient to duplicate registration. Logging unexpected registration errors follows the project policy of avoiding panics in init.
Added tests exercising PushMetrics and the counter logic.

@nezlobnaya nezlobnaya marked this pull request as ready for review October 31, 2025 20:17
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.

2 participants