Repository navigation
refactor: notification metrics come from spans, and NotificationMetrics is gone - #399
Merged
Merged
Conversation
…cs is gone Each delivery is a notification.deliver span with category, channel, severity, result, error and delivery seconds, and the throttle, each retry and each subscription update leave a notification.throttled, notification.retry or notification.subscription_change span. The collector's signaltometrics connector makes the same ten series from them. Labels take the span attribute names, so the notifications dashboard moves with them. Part of #389.
HardMax71
enabled auto-merge (squash)
October 18, 2026 23:00
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
|
|
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Part of #389, the notifications area. The ten instruments in
NotificationMetricsnow come from spans, soNotificationServicehas no meter left.Changes
Each delivery runs in a
notification.deliverspan with category, channel, severity, result, error type and delivery seconds. The throttle, each retry and each subscription update leave a one-linenotification.throttled,notification.retryornotification.subscription_changespan where the metric call was. The collector'ssignaltometricsconnector makes the same ten series from them. Labels take the span attribute names (notification_channel,notification_error, ...), so the notifications dashboard's queries and legends move with them.NotificationServicetakestrace.Tracer.Type of Change
Test Plan
cd backend && uv run pytest tests/unit)cd frontend && npm run test)docker compose exec -T backend sh -c 'uv sync --group test --no-dev --frozen --no-install-project --no-build && pytest tests/e2e')cd frontend && npm run test:e2e)./deploy.sh openapi, then./deploy.sh types), never edited by handValidation: unit 570 passed (6 span tests), contract 3 passed, e2e 488 passed and 1 skipped. Driving
NotificationServicefrom the API container against a local stack (3 in-app deliveries, 1 webhook to a closed port, 2 subscription updates) gave exactly those counts in VictoriaMetrics, with 2 retries andConnectErroron the failure. The throttle path is covered by a unit test only.Checklist
pre-commit run --all-filesand all checks passSummary by cubic
Moves notification metrics from
NotificationMetricsinstruments to spans, with no change to the ten series emitted (part of #389).Changes
notification.deliverspan; the throttle, each retry, and each subscription update emitnotification.throttled,notification.retry, andnotification.subscription_changespans.signaltometricsconnector derives the ten series from those spans, and label names become the span attribute names; the notifications dashboard moves with them.NotificationServicenow takes atrace.Tracerinstead of a meter, andNotificationMetricsis removed.Written for commit cec550a. Summary will update on new commits.