Area
Notification Service / Observability
Complexity
Easy
File(s)
notification-service/src/index.ts (main, lines 38-93); notification-service/src/metrics.ts; notification-service/src/api.ts (createApi, lines 88-92)
Problem
Metrics.recordEventProcessed()/recordNotificationSent() are only ever called from metrics.test.ts and api.test.ts. In index.ts's real main(), no Metrics instance is created, createApi(store) is called with no options.metrics, and neither handleScoreChanged nor Notifier.notifyInvestors records anything. Result: in production, GET /metrics 404s, and even if wired, the counters would never move — there is zero runtime observability into event/notification volume.
Scope
In:
- Instantiate Metrics in main(), pass it to createApi, call recordEventProcessed in the listener callback and recordNotificationSent on each successful delivery in notifyInvestors.
Out:
- A full metrics backend (Prometheus/StatsD export) — the in-memory snapshot model can stay.
Acceptance Criteria
Area
Notification Service / Observability
Complexity
Easy
File(s)
notification-service/src/index.ts (main, lines 38-93); notification-service/src/metrics.ts; notification-service/src/api.ts (createApi, lines 88-92)
Problem
Metrics.recordEventProcessed()/recordNotificationSent() are only ever called from metrics.test.ts and api.test.ts. In index.ts's real main(), no Metrics instance is created, createApi(store) is called with no options.metrics, and neither handleScoreChanged nor Notifier.notifyInvestors records anything. Result: in production, GET /metrics 404s, and even if wired, the counters would never move — there is zero runtime observability into event/notification volume.
Scope
In:
Out:
Acceptance Criteria