grafana / alloy

OpenTelemetry Collector distribution with programmable pipelines
https://grafana.com/oss/alloy
Apache License 2.0
1.43k stars 211 forks source link

Add `PPROF_MUTEX_PROFILING_PERCENT` env var details #1190

Closed clayton-cornell closed 3 months ago

clayton-cornell commented 4 months ago

PPROF_MUTEX_PROFILING_PERCENT enables the ability to retrieve data from the pprof mutex endpoint. It needs to be set to a whole number, for example 50 would profile 50% of the mutexes. 5 is likely a sufficient value. By default we sample 0.01 percent.

PPROF_BLOCK_PROFILING_RATE also allows tracking of mutexes for arcane reasons 1 tracks everything, 0 tracks nothing. Any value over 1 is treated as track anything over nanoseconds. By default we apply 10,000 for tracking.

Originally posted by @mattdurham in https://github.com/grafana/alloy/issues/1137#issuecomment-2206532926

github-actions[bot] commented 3 months ago

This issue has not had any activity in the past 30 days, so the needs-attention label has been added to it. If the opened issue is a bug, check to see if a newer release fixed your issue. If it is no longer relevant, please feel free to close this issue. The needs-attention label signals to maintainers that something has fallen through the cracks. No action is needed by you; your issue will be kept open and you do not have to respond to this comment. The label will be removed the next time this job runs if there is new activity. Thank you for your contributions!

clayton-cornell commented 3 months ago

@mattdurham A question about the description provided for PPROF_MUTEX_PROFILING_PERCENT. The env var needs to be set to a while number (integer)? But... the default is 0.01 percent? Those two things don't add up for me. 0.01 isn't a whole number... should that have been 1 (meaning 1%)?