-
Notifications
You must be signed in to change notification settings - Fork 720
refactor: remove legacy NATS metrics and stats_handler #4680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| .metrics_registry | ||
| .add_update_callback(nats_client_callback); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also remove start_stats_service and add_stats_service from this file, and all of lib/runtime/src/component/service.rs ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I'll remove these unused code with pleasure. Coming up!
|
Is it Xmas already?! |
WalkthroughThe PR removes Prometheus metrics instrumentation for NATS throughout the runtime codebase. This includes deleting NATS-specific metric definitions, metrics wrapper structs, metrics integration in initialization paths, test helpers, and adjusting test assertions to account for fewer metrics. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Poem
Pre-merge checks✅ Passed checks (3 passed)
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 |
883c4a6 to
ec1c7bb
Compare
3c68913 to
674e945
Compare
Remove all NATS metrics collection and reporting code from the runtime: - Remove NATS metric constants (nats_client, nats_service modules) - Remove ComponentNatsServerPrometheusMetrics struct and impl - Remove DRTNatsClientPrometheusMetrics struct and impl - Remove nats_metrics_worker background task - Remove NATS metrics tests - Remove NATS metrics helper functions - Remove stats_handler infrastructure (EndpointStatsHandler, service.rs) - Update tests to not filter NATS metrics - Update runtime examples to remove stats_handler usage - Clarify distributed_runtime.md documentation This removes ~1200 lines of code while maintaining all passing tests. The system no longer collects or reports NATS client/service metrics. Fix assert_eq! argument order in metrics tests The assert_eq! macro arguments were swapped relative to the error message template. Fixed by swapping 'Expected' and 'Actual' labels in the error message to match the actual order of arguments (actual, expected). Signed-off-by: Keiven Chang <keivenchang@users.noreply.github.com>
674e945 to
424d2da
Compare
Overview:
This PR removes the legacy NATS metrics reporting infrastructure from the runtime, eliminating ~1200 lines of unused code while maintaining all passing tests.
Details:
Where should the reviewer start?
Related Issues:
/coderabbit profile chill