opentelemetry-instrumentation-system-metrics: Add cpython.gc.collected_objects and cpython.gc.uncollectable_objects metrics#3666
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? |
|
emdneto
left a comment
There was a problem hiding this comment.
Hey @david-gang sorry! I'm fine with option 1.
…cted_objects` and `cpython.gc.uncollectable_objects` metrics (open-telemetry#3666) * `opentelemetry-instrumentation-system-metrics`: Add `cpython.gc.collected_objects` and `cpython.gc.uncollectable_objects` metrics * Update __init__.py * Update CHANGELOG.md --------- Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Description
opentelemetry-instrumentation-system-metrics: Addcpython.gc.collected_objectsandcpython.gc.uncollectable_objectsmetricsFixes #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.