You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add standalone CPython GC metrics through existing OpenTelemetry collection #46732
I have searched for existing issues, including closed ones.
I confirm that I am using English to submit this report, otherwise it will be closed.
Please do not modify this template :) and fill in all the required fields.
1. Is this request related to a challenge you're experiencing? Tell me about your story.
We need to compare cyclic-GC frequency, cumulative collection elapsed time and pause distributions by process/Pod under real workloads, including blue/green deployments. These observations should be available independently of changes to GC behavior, so enabling metrics does not require enabling gc.freeze() or changing GC thresholds.
Requested behavior:
Enable GC telemetry through the existing ENABLE_OTEL configuration, metric collection/export cycle and collector.
Reuse SystemMetricsInstrumentor for native per-generation collection, collected-object and uncollectable-object counters.
Record collection elapsed time with lightweight gc.callbacks, and expose duration histograms, scheduling counters, thresholds and automatic-GC state.
Keep callback work free of I/O and SDK recording/export. Buffer duration samples with a bounded capacity for each generation, preserving Gen2 samples during bursts of young-generation collections, and report dropped samples per generation.
The metrics originated in #46432. This issue tracks their standalone extraction, including the per-generation buffer fix in fac16a79ed3ad2e80b4fdc6875a8bf81bb3fbaeb. GC freeze and other behavior optimizations remain outside its scope.
Activity