Skip to content

fix(ratelimiter): log metrics server failure instead of swallowing it - #541

Open
mesutoezdil wants to merge 1 commit into
NVIDIA:mainfrom
mesutoezdil:mesutoezdil/fix/ratelimiter-metrics-error-log
Open

fix(ratelimiter): log metrics server failure instead of swallowing it#541
mesutoezdil wants to merge 1 commit into
NVIDIA:mainfrom
mesutoezdil:mesutoezdil/fix/ratelimiter-metrics-error-log

Conversation

@mesutoezdil

@mesutoezdil mesutoezdil commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

setupMetrics swallowed the ListenAndServe error in an empty branch, so a
failed Prometheus bind left the service running with no metrics and no log
line. Now logs at error level, matching setupPprof and setupOlricStats.

Issues

Closes #540

Summary by CodeRabbit

  • Bug Fixes
    • Added error logging when the rate-limiter metrics service fails to start, improving visibility into service startup issues.

@mesutoezdil
mesutoezdil requested a review from a team as a code owner July 29, 2026 21:16
@mesutoezdil
mesutoezdil requested a review from balajinvda July 29, 2026 21:16
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The rate-limiter metrics HTTP listener now logs errors returned by ListenAndServe, including failures to start the /metrics server.

Changes

Rate-limiter metrics

Layer / File(s) Summary
Log metrics listener failures
src/invocation-plane-services/ratelimiter/cmd/main.go
Records ListenAndServe failures with an error-level zap log.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: balajinvda

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The change logs the metrics listener failure, satisfying issue #540 and preventing the error from being silently discarded.
Out of Scope Changes check ✅ Passed The single-line change is limited to the linked issue objective and contains no unrelated modifications.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title follows Conventional Commits and accurately identifies the ratelimiter bug fix.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@mesutoezdil
mesutoezdil force-pushed the mesutoezdil/fix/ratelimiter-metrics-error-log branch 2 times, most recently from ba46b85 to bc0347c Compare July 31, 2026 06:47
Signed-off-by: mesutoezdil <mesudozdil@gmail.com>
@mesutoezdil
mesutoezdil force-pushed the mesutoezdil/fix/ratelimiter-metrics-error-log branch from bc0347c to 4bccf44 Compare August 1, 2026 07:54
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.

ratelimiter: metrics server failure is swallowed by an empty error branch

1 participant