-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Change process_runtime_heap_alloc_bytes
metric to include memory ballast size
#8342
Comments
Note that this was explicitly mentioned in the original #45 PR (emphasis mine)
|
This change would make sense to me. How do you propose introducing the change? I'd expect anyone that monitors using this value today will be surprised to see that value change by the ballast size after a release. |
We can add the |
Sounds good. Pinging @open-telemetry/collector-approvers for more eyes on this |
Why do we need to tackle this before the potential removal of the memory_ballast? I think doing it implicitly for user is pretty tricky. I'd suggest not touching it until we decide on the removal of the memory_ballast. I hope we will be able to remove the memory ballast. In that case, the transition will be pretty obvious for the user:
|
Let's discuss #8343 first, but my expectation would be that removing the memory ballast is going to be a lengthy process given how widely it is used, and I don't want to block doing this refactor on the ballast removal because
|
We can wait for open-telemetry/opentelemetry-helm-charts/issues/891, if we can remove the extension 'quickly' I think we can avoid doing this in two steps. |
The
process/runtime/heap_alloc_bytes
/process_runtime_heap_alloc_bytes
metric is defined asbut, since #45, the actual value is
runtime.MemStats.HeapAlloc
minus the memory ballast size if thememory_ballast
extension is being used:opentelemetry-collector/service/internal/proctelemetry/process_telemetry.go
Lines 283 to 293 in 7030388
This delays the process metrics initialization until extensions are running:
opentelemetry-collector/service/service.go
Line 223 in 7030388
We should remove this special case and change the metric to report the raw value of
runtime.MemStats.HeapAlloc
instead, which will simplify both the metric's semantics as well as the implementation of telemetry initialization. If we keep using the memory ballast extension (see the separate issue #8343 for discussion on this, which may happen after this change), we can add a metric to thememory_ballast
extension to indicate the memory ballast size and be able to recover the previous value reported by this metric.If we find out it is not desirable to just report
runtime.MemStats.HeapAlloc
, we should instead change the metric description to state that the memory ballast value is removed.The text was updated successfully, but these errors were encountered: