Commit dbf56510 authored by Avielle Wolfe's avatar Avielle Wolfe

Add `jobs_count` field to `LimitExceededError`

It will be useful to be able to perform filtering in Kibana based on the
number of jobs in a pipeline for pipelines that have exceeded either a
configured size limit or the unenforced default global limit of 2000.

https://gitlab.com/gitlab-org/gitlab/-/issues/285093
parent b2a851ad
......@@ -39,6 +39,7 @@ module EE
def log_attrs
{
jobs_count: pipeline.statuses.count,
pipeline_source: pipeline.source,
plan: project.actual_plan_name,
project_id: project.id,
......
......@@ -70,6 +70,7 @@ RSpec.describe ::Gitlab::Ci::Pipeline::Chain::Limit::Size do
it 'logs the error' do
expect(Gitlab::ErrorTracking).to receive(:log_exception).with(
instance_of(Gitlab::Ci::Limit::LimitExceededError),
jobs_count: pipeline.statuses.count,
project_id: project.id, plan: namespace.actual_plan_name,
project_full_path: project.full_path, pipeline_source: pipeline.source
)
......@@ -152,6 +153,7 @@ RSpec.describe ::Gitlab::Ci::Pipeline::Chain::Limit::Size do
it 'logs the pipeline' do
expect(Gitlab::ErrorTracking).to receive(:log_exception).with(
instance_of(Gitlab::Ci::Limit::LimitExceededError),
jobs_count: pipeline.statuses.count,
project_id: project.id, plan: namespace.actual_plan_name,
project_full_path: project.full_path, pipeline_source: pipeline.source
)
......
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