Skip to content

Extract shared ASB Prometheus helpers#46

Merged
haasonsaas merged 1 commit intomainfrom
codex/asb-promutil-cleanup
Apr 14, 2026
Merged

Extract shared ASB Prometheus helpers#46
haasonsaas merged 1 commit intomainfrom
codex/asb-promutil-cleanup

Conversation

@haasonsaas
Copy link
Copy Markdown
Collaborator

Summary

  • extract shared Prometheus metric registration helpers into internal/promutil
  • switch internal/app and internal/worker metrics to the shared helper package
  • remove the duplicated local implementations without changing metric names or registration behavior

Testing

  • go test ./internal/app ./internal/worker -count=1
  • go test ./... -count=1

@cursor
Copy link
Copy Markdown

cursor bot commented Apr 14, 2026

PR Summary

Low Risk
Low risk refactor that centralizes metric prefix normalization and collector registration logic; behavior should remain the same but could impact metric naming/registration if the shared helpers diverge.

Overview
Extracts shared Prometheus utilities into new internal/promutil (MetricPrefix plus Register* helpers that reuse already-registered collectors).

Updates both internal/app and internal/worker metrics initialization to use promutil and removes their duplicated local implementations, without changing the metric definitions themselves.

Reviewed by Cursor Bugbot for commit 54af392. Bugbot is set up for automated code reviews on this repo. Configure here.

@haasonsaas haasonsaas merged commit 7140f85 into main Apr 14, 2026
4 checks passed
@haasonsaas haasonsaas deleted the codex/asb-promutil-cleanup branch April 14, 2026 05:22
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