-
Notifications
You must be signed in to change notification settings - Fork 6
DOG-6508: Metrics pickling issue #498
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
Conversation
Summary of ChangesHello @Hmnt39, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly refactors how metrics are handled within the extractor framework, specifically addressing issues related to serializing Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request effectively resolves a serialization issue with BaseMetrics instances in a multiprocessing context by passing the metrics class instead of an instance. The extractor now correctly initializes metrics as a singleton within each process, preventing Prometheus registry conflicts. The changes are well-implemented, and the addition of comprehensive integration tests is a great improvement. I have one suggestion to remove some dead code for better maintainability.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #498 +/- ##
==========================================
+ Coverage 80.98% 81.04% +0.05%
==========================================
Files 43 43
Lines 4203 4210 +7
==========================================
+ Hits 3404 3412 +8
+ Misses 799 798 -1
🚀 New features to boost your workflow:
|
devendra-lohar
left a comment
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.
LGTM
|
/gemini review |
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.
Code Review
This pull request effectively resolves a metric serialization issue encountered in multiprocessing environments by refactoring the system to pass the metrics class instead of an instance. The introduction of a singleton pattern for metrics initialization is a robust solution to prevent Prometheus registry conflicts. The changes are well-implemented across the core base and runtime modules. Furthermore, the addition of comprehensive and well-designed tests, including an integration test that verifies the fix across process boundaries and new validation tests, significantly improves the reliability and test coverage of the metrics functionality. The code quality is high, and the approach taken is solid.
rbtcollins
left a comment
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.
🦄
rbtcollins
left a comment
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.
🦄
This PR resolves metrics serialization errors when passing
BaseMetricsinstances through multiprocessing by changing the runtime to pass the metrics class instead of an instance. The extractor now initializes metrics internally using a singleton pattern to avoid Prometheus registry conflicts.Added comprehensive tests to verify metrics work correctly across process boundaries.