-
Notifications
You must be signed in to change notification settings - Fork 766
opentelemetry-instrumentation-system-metrics
: Add cpython.gc.collected_objects
and cpython.gc.uncollectable_objects
metrics
#3666
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
Well murphy's law :-) I had the merit to write the 1001th line
|
…cted_objects` and `cpython.gc.uncollectable_objects` metrics
0ac41bb
to
6e80f50
Compare
Hey @emdneto — WDYT about relaxing the 1000-line limit in this case? The system_metrics module is a bit of an outlier — it’s a bag of low-level metrics with dispersed logic. I’m currently at 993 lines, and supporting additional metrics cleanly would push me just over 1000. If relaxing the limit isn’t an option, I can work around it by wrapping the callback function with functools.partial, adding parameters dynamically. Here’s a simplified sketch:
But I’m not sure this workaround justifies the tradeoff in readability and complexity for a few lines saved. Two ideas I’m considering: Thoughts? |
|
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.
Hey @david-gang sorry! I'm fine with option 1.
Description
opentelemetry-instrumentation-system-metrics
: Addcpython.gc.collected_objects
andcpython.gc.uncollectable_objects
metricsFixes #3649
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.