Disable Prometheus metrics if initialization fails
Previously if the underlying filesystem ran of space, reads and writes to mmap() regions would throw an ugly SIGBUS error and crash. With prometheus-client-mmap v0.10.0, `Prometheus::Client.reinitialize_on_pid_change` will now throw an IOError if initialization fails for some reason. If this happens, we disable internal Prometheus metrics to ensure the system stays up. Closes https://gitlab.com/gitlab-org/gitlab/issues/24425
显示
- Gemfile 1 个添加, 1 个删除Gemfile
- Gemfile.lock 2 个添加, 2 个删除Gemfile.lock
- changelogs/unreleased/sh-disable-prom-metrics-on-failure.yml 5 个添加, 0 个删除changelogs/unreleased/sh-disable-prom-metrics-on-failure.yml
- config/initializers/7_prometheus_metrics.rb 6 个添加, 0 个删除config/initializers/7_prometheus_metrics.rb
- lib/gitlab/metrics.rb 6 个添加, 0 个删除lib/gitlab/metrics.rb
- lib/gitlab/metrics/prometheus.rb 9 个添加, 1 个删除lib/gitlab/metrics/prometheus.rb
- spec/lib/gitlab/metrics/prometheus_spec.rb 17 个添加, 0 个删除spec/lib/gitlab/metrics/prometheus_spec.rb
加载中
想要评论请 注册 或 登录