Commit 44cea3d9 authored by Ethan Urie's avatar Ethan Urie

Rename latency metric to duration

parent 0ee06f10
......@@ -103,7 +103,7 @@ module Spam
end
def histogram
@histogram ||= Gitlab::Metrics.histogram(:spamcheck_latency_seconds, 'Latency to the Spamcheck service')
@histogram ||= Gitlab::Metrics.histogram(:gitlab_spamcheck_request_duration_seconds, 'Request duration to the anti-spam service')
end
end
end
......@@ -129,7 +129,7 @@ The following metrics are available:
| `pipeline_graph_links_per_job_ratio` | Histogram | 13.9 | Ratio of links to job per graph | |
| `gitlab_ci_pipeline_security_orchestration_policy_processing_duration_seconds` | Histogram | 13.12 | Time in seconds it takes to process Security Policies in CI/CD pipeline | |
| `gitlab_ci_difference_live_vs_actual_minutes` | Histogram | 13.12 | Difference between CI minute consumption counted while jobs were running (live) vs when jobs are complete (actual). Used to enforce CI minute consumption limits on long running jobs. | `plan` |
| `spamcheck_latency_seconds` | Histogram | 13.12 | The latency for requests between Rails and the anti-spam engine | |
| `gitlab_spamcheck_request_duration_seconds` | Histogram | 13.12 | The duration for requests between Rails and the anti-spam engine | |
## Metrics controlled by a feature flag
......
......@@ -131,11 +131,11 @@ RSpec.describe Spam::SpamVerdictService do
with_them do
before do
allow(Gitlab::Metrics).to receive(:histogram).with(:spamcheck_latency_seconds, anything).and_return(histogram)
allow(Gitlab::Metrics).to receive(:histogram).with(:gitlab_spamcheck_request_duration_seconds, anything).and_return(histogram)
allow(service).to receive(:spamcheck_verdict).and_return([verdict, attribs, error])
end
it 'records latency with labels' do
it 'records duration with labels' do
expect(histogram).to receive(:observe).with(a_hash_including(result: label), anything)
subject
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