Skip to content

[metrics] fix prometheus registry#237

Merged
capcom6 merged 1 commit into
masterfrom
metrics/fix-prometheus-registry
Jun 15, 2026
Merged

[metrics] fix prometheus registry#237
capcom6 merged 1 commit into
masterfrom
metrics/fix-prometheus-registry

Conversation

@capcom6

@capcom6 capcom6 commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes
    • Improved metrics endpoint initialization for better registry handling.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e0ad1acd-cee1-4d0c-989f-7b29231cd85e

📥 Commits

Reviewing files that changed from the base of the PR and between 36f51fe and 85797f5.

📒 Files selected for processing (1)
  • internal/sms-gateway/modules/metrics/handler.go

📝 Walkthrough

Walkthrough

This PR updates the metrics HTTP handler to initialize the fiberprometheus middleware using NewWithDefaultRegistry("") instead of New(""), which changes how the default Prometheus registry is selected for the /metrics endpoint.

Changes

Metrics Handler Registry Initialization

Layer / File(s) Summary
Metrics handler registry initialization
internal/sms-gateway/modules/metrics/handler.go
The fiberprometheus middleware constructor is updated to use NewWithDefaultRegistry("") for proper default Prometheus registry initialization.

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: fixing how the Prometheus registry is initialized in the metrics handler.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

🤖 Pull request artifacts

Platform File
🐳 Docker GitHub Container Registry
🍎 Darwin arm64 server_Darwin_arm64.tar.gz
🍎 Darwin x86_64 server_Darwin_x86_64.tar.gz
🐧 Linux arm64 server_Linux_arm64.tar.gz
🐧 Linux i386 server_Linux_i386.tar.gz
🐧 Linux x86_64 server_Linux_x86_64.tar.gz
🪟 Windows arm64 server_Windows_arm64.zip
🪟 Windows i386 server_Windows_i386.zip
🪟 Windows x86_64 server_Windows_x86_64.zip

@capcom6 capcom6 added ready deployed The PR is deployed on staging labels Jun 12, 2026
@capcom6 capcom6 merged commit f914877 into master Jun 15, 2026
11 checks passed
@capcom6 capcom6 deleted the metrics/fix-prometheus-registry branch June 15, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deployed The PR is deployed on staging ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant