Skip to content

Add Prometheus client after_fork hook to reset file backed metrics

While I couldn't reproduce this case locally even with preload preload_app: true this edgecase will cause corruption whenever any metric it initialized within Unicorn master process.

This MR fixes this edgecase by resetting all metrics that are backed by metrics files allowing them to be correctly initialized with new PID of new worker.

Closes: https://gitlab.com/gitlab-org/gitlab-ce/issues/35588

Edited by username-removed-676946

Merge request reports