Commit 0ccea59d authored by James Fargher's avatar James Fargher

Merge branch 'revert-fd57cd63' into 'master'

Revert "Add metrics for paused indexing Sidekiq queue size"

See merge request gitlab-org/gitlab!36395
parents 6a9c2b82 9ab08d67
...@@ -173,7 +173,6 @@ configuration option in `gitlab.yml`. These metrics are served from the ...@@ -173,7 +173,6 @@ configuration option in `gitlab.yml`. These metrics are served from the
| `geo_repositories_retrying_verification_count` | Gauge | 11.2 | Number of repositories verification failures that Geo is actively trying to correct on secondary | `url` | | `geo_repositories_retrying_verification_count` | Gauge | 11.2 | Number of repositories verification failures that Geo is actively trying to correct on secondary | `url` |
| `geo_wikis_retrying_verification_count` | Gauge | 11.2 | Number of wikis verification failures that Geo is actively trying to correct on secondary | `url` | | `geo_wikis_retrying_verification_count` | Gauge | 11.2 | Number of wikis verification failures that Geo is actively trying to correct on secondary | `url` |
| `global_search_bulk_cron_queue_size` | Gauge | 12.10 | Number of database records waiting to be synchronized to Elasticsearch | | | `global_search_bulk_cron_queue_size` | Gauge | 12.10 | Number of database records waiting to be synchronized to Elasticsearch | |
| `global_search_awaiting_indexing_queue_size` | Gauge | 13.2 | Number of database updates waiting to be synchronized to Elasticsearch while indexing is paused | |
| `package_files_count` | Gauge | 13.0 | Number of package files on primary | `url` | | `package_files_count` | Gauge | 13.0 | Number of package files on primary | `url` |
| `package_files_checksummed_count` | Gauge | 13.0 | Number of package files checksummed on primary | `url` | | `package_files_checksummed_count` | Gauge | 13.0 | Number of package files checksummed on primary | `url` |
| `package_files_checksum_failed_count` | Gauge | 13.0 | Number of package files failed to calculate the checksum on primary | `package_files_checksum_failed_count` | Gauge | 13.0 | Number of package files failed to calculate the checksum on primary
......
---
title: Add Prometheus Metrics for Index Pause Sidekiq Queue.
merge_request: 35871
author:
type: changed
...@@ -11,9 +11,6 @@ module Elastic ...@@ -11,9 +11,6 @@ module Elastic
initial_gauge = Gitlab::Metrics.gauge(:global_search_bulk_cron_initial_queue_size, 'Number of initial database updates waiting to be synchronized to Elasticsearch', {}, :max) initial_gauge = Gitlab::Metrics.gauge(:global_search_bulk_cron_initial_queue_size, 'Number of initial database updates waiting to be synchronized to Elasticsearch', {}, :max)
initial_gauge.set({}, Elastic::ProcessInitialBookkeepingService.queue_size) initial_gauge.set({}, Elastic::ProcessInitialBookkeepingService.queue_size)
awaiting_indexing_gauge = Gitlab::Metrics.gauge(:global_search_awaiting_indexing_queue_size, 'Number of database updates waiting to be synchronized to Elasticsearch while indexing is paused.', {}, :max)
awaiting_indexing_gauge.set({}, Elastic::IndexingControlService.queue_size)
end end
private private
......
...@@ -14,7 +14,6 @@ RSpec.describe Elastic::MetricsUpdateService, :prometheus do ...@@ -14,7 +14,6 @@ RSpec.describe Elastic::MetricsUpdateService, :prometheus do
it 'sets gauges' do it 'sets gauges' do
expect(Elastic::ProcessBookkeepingService).to receive(:queue_size).and_return(4) expect(Elastic::ProcessBookkeepingService).to receive(:queue_size).and_return(4)
expect(Elastic::ProcessInitialBookkeepingService).to receive(:queue_size).and_return(6) expect(Elastic::ProcessInitialBookkeepingService).to receive(:queue_size).and_return(6)
expect(Elastic::IndexingControlService).to receive(:queue_size).and_return(2)
incremental_gauge_double = instance_double(Prometheus::Client::Gauge) incremental_gauge_double = instance_double(Prometheus::Client::Gauge)
expect(Gitlab::Metrics).to receive(:gauge) expect(Gitlab::Metrics).to receive(:gauge)
...@@ -26,14 +25,8 @@ RSpec.describe Elastic::MetricsUpdateService, :prometheus do ...@@ -26,14 +25,8 @@ RSpec.describe Elastic::MetricsUpdateService, :prometheus do
.with(:global_search_bulk_cron_initial_queue_size, anything, {}, :max) .with(:global_search_bulk_cron_initial_queue_size, anything, {}, :max)
.and_return(initial_gauge_double) .and_return(initial_gauge_double)
awaiting_indexing_gauge = instance_double(Prometheus::Client::Gauge)
expect(Gitlab::Metrics).to receive(:gauge)
.with(:global_search_awaiting_indexing_queue_size, anything, {}, :max)
.and_return(awaiting_indexing_gauge)
expect(incremental_gauge_double).to receive(:set).with({}, 4) expect(incremental_gauge_double).to receive(:set).with({}, 4)
expect(initial_gauge_double).to receive(:set).with({}, 6) expect(initial_gauge_double).to receive(:set).with({}, 6)
expect(awaiting_indexing_gauge).to receive(:set).with({}, 2)
subject.execute subject.execute
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment