Don't clean Sidekiq processes when fetching metrics
What does this MR do?
The Sidekiq process metrics API endpoint uses the default argument for
clean_plz
to Sidekiq::ProcessSet
, which is true
. We don't actually
need to clean the processes here because it's a read-only API endpoint,
and Sidekiq does this automatically in the regular processes.
To test this, you can do:
# in one terminal
$ while true; do curl -H "Private-Token: $GITLAB_API_TOKEN_LOCAL" http://localhost:3000/api/v4/sidekiq/process_metrics; done
# in another
$ gdk redis-cli monitor | grep hget
Before this change, we see:
1600255991.162196 [0 unix:/Users/smcgivern/Code/gdk/redis/redis.socket] "hget" "resque:gitlab:SeansGitLabMBP:21637:1df606d0b85b" "info"
1600255991.490564 [0 unix:/Users/smcgivern/Code/gdk/redis/redis.socket] "hget" "resque:gitlab:SeansGitLabMBP:21637:1df606d0b85b" "info"
1600255991.692927 [0 unix:/Users/smcgivern/Code/gdk/redis/redis.socket] "hget" "resque:gitlab:SeansGitLabMBP:21637:1df606d0b85b" "info"
1600255991.903874 [0 unix:/Users/smcgivern/Code/gdk/redis/redis.socket] "hget" "resque:gitlab:SeansGitLabMBP:21637:1df606d0b85b" "info"
1600255992.102929 [0 unix:/Users/smcgivern/Code/gdk/redis/redis.socket] "hget" "resque:gitlab:SeansGitLabMBP:21637:1df606d0b85b" "info"
1600255992.302646 [0 unix:/Users/smcgivern/Code/gdk/redis/redis.socket] "hget" "resque:gitlab:SeansGitLabMBP:21637:1df606d0b85b" "info"
1600255992.514039 [0 unix:/Users/smcgivern/Code/gdk/redis/redis.socket] "hget" "resque:gitlab:SeansGitLabMBP:21637:1df606d0b85b" "info"
1600255992.716294 [0 unix:/Users/smcgivern/Code/gdk/redis/redis.socket] "hget" "resque:gitlab:SeansGitLabMBP:21637:1df606d0b85b" "info"
1600255992.927515 [0 unix:/Users/smcgivern/Code/gdk/redis/redis.socket] "hget" "resque:gitlab:SeansGitLabMBP:21637:1df606d0b85b" "info"
After this change, we see nothing.
See https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/11332 for more details.