diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /lib/gitlab/instrumentation_helper.rb | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'lib/gitlab/instrumentation_helper.rb')
-rw-r--r-- | lib/gitlab/instrumentation_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/instrumentation_helper.rb b/lib/gitlab/instrumentation_helper.rb index c10c4a7bedf..23acf1e8e86 100644 --- a/lib/gitlab/instrumentation_helper.rb +++ b/lib/gitlab/instrumentation_helper.rb @@ -30,6 +30,7 @@ module Gitlab instrument_cpu(payload) instrument_thread_memory_allocations(payload) instrument_load_balancing(payload) + instrument_pid(payload) end def instrument_gitaly(payload) @@ -99,6 +100,10 @@ module Gitlab payload[:cpu_s] = cpu_s.round(DURATION_PRECISION) if cpu_s end + def instrument_pid(payload) + payload[:pid] = Process.pid + end + def instrument_thread_memory_allocations(payload) counters = ::Gitlab::Memory::Instrumentation.measure_thread_memory_allocations( ::Gitlab::RequestContext.instance.thread_memory_allocations) |