Conversation
Add MongoDB, payload and delta size metrics with OOM-debug logging
There was a problem hiding this comment.
Pull request overview
This pull request adds Prometheus metrics instrumentation to the Grouper worker to enable monitoring of event processing. The implementation creates a shared metrics registry, adds various counters and histograms to track events, errors, durations, and data sizes, and sets up automatic periodic pushing to a Prometheus Pushgateway.
Changes:
- Added new
lib/metrics.tsmodule with shared Prometheus registry and push functionality - Instrumented GrouperWorker with 7 metrics: events counter (new/repeated), processing duration, errors, MongoDB operation durations, delta/payload sizes, and duplicate retries
- Re-enabled metrics pushing in runner with simplified initialization
- Added environment variables for memory monitoring configuration
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| lib/metrics.ts | New module providing shared Prometheus registry and pushgateway integration |
| workers/grouper/src/index.ts | Added metrics instrumentation, timer tracking for operations, and memory monitoring utilities |
| runner.ts | Re-enabled metrics initialization calling new metrics module for each worker |
| .env.sample | Added environment variables for memory monitoring thresholds |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…etry double-counting in grouper
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add Prometheus metrics to Grouper worker: events counter (new/repeated), processing duration histogram, errors counter. Metrics are pushed to Pushgateway every 10s.
grouper-metrics-hawk_worker_grouper_metrics_e2e_1771436868147.log