Merge branch '65278-livesum-puma-phase' into 'master'
Remove :puma_phase metrics See merge request gitlab-org/gitlab-ce!31773
This commit is contained in:
commit
2c71a94744
3 changed files with 0 additions and 6 deletions
|
@ -120,7 +120,6 @@ When Puma is used instead of Unicorn, following metrics are available:
|
|||
| puma_workers | Gauge | 12.0 | Total number of workers |
|
||||
| puma_running_workers | Gauge | 12.0 | Number of booted workers |
|
||||
| puma_stale_workers | Gauge | 12.0 | Number of old workers |
|
||||
| puma_phase | Gauge | 12.0 | Phase number (increased during phased restarts) |
|
||||
| puma_running | Gauge | 12.0 | Number of running threads |
|
||||
| puma_queued_connections | Gauge | 12.0 | Number of connections in that worker's "todo" set waiting for a worker thread |
|
||||
| puma_active_connections | Gauge | 12.0 | Number of threads processing a request |
|
||||
|
|
|
@ -15,7 +15,6 @@ module Gitlab
|
|||
puma_workers: ::Gitlab::Metrics.gauge(:puma_workers, 'Total number of workers'),
|
||||
puma_running_workers: ::Gitlab::Metrics.gauge(:puma_running_workers, 'Number of active workers'),
|
||||
puma_stale_workers: ::Gitlab::Metrics.gauge(:puma_stale_workers, 'Number of stale workers'),
|
||||
puma_phase: ::Gitlab::Metrics.gauge(:puma_phase, 'Phase number (increased during phased restarts)'),
|
||||
puma_running: ::Gitlab::Metrics.gauge(:puma_running, 'Number of running threads'),
|
||||
puma_queued_connections: ::Gitlab::Metrics.gauge(:puma_queued_connections, 'Number of connections in that worker\'s "todo" set waiting for a worker thread'),
|
||||
puma_active_connections: ::Gitlab::Metrics.gauge(:puma_active_connections, 'Number of threads processing a request'),
|
||||
|
@ -54,7 +53,6 @@ module Gitlab
|
|||
last_status = worker['last_status']
|
||||
labels = { worker: "worker_#{worker['index']}" }
|
||||
|
||||
metrics[:puma_phase].set(labels, worker['phase'])
|
||||
set_worker_metrics(last_status, labels) if last_status.present?
|
||||
end
|
||||
end
|
||||
|
@ -76,7 +74,6 @@ module Gitlab
|
|||
metrics[:puma_workers].set(labels, stats['workers'])
|
||||
metrics[:puma_running_workers].set(labels, stats['booted_workers'])
|
||||
metrics[:puma_stale_workers].set(labels, stats['old_workers'])
|
||||
metrics[:puma_phase].set(labels, stats['phase'])
|
||||
end
|
||||
|
||||
def set_worker_metrics(stats, labels = {})
|
||||
|
|
|
@ -46,8 +46,6 @@ describe Gitlab::Metrics::Samplers::PumaSampler do
|
|||
expect(subject.metrics[:puma_workers]).to receive(:set).with(labels, 2)
|
||||
expect(subject.metrics[:puma_running_workers]).to receive(:set).with(labels, 2)
|
||||
expect(subject.metrics[:puma_stale_workers]).to receive(:set).with(labels, 0)
|
||||
expect(subject.metrics[:puma_phase]).to receive(:set).once.with(labels, 2)
|
||||
expect(subject.metrics[:puma_phase]).to receive(:set).once.with({ worker: 'worker_0' }, 1)
|
||||
|
||||
subject.sample
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue