Commit a7d51dce authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'ci-pipeline-logger-update-pipeline-source' into 'master'

Rename source to pipeline_source in the pipeline logger

See merge request gitlab-org/gitlab!75343
parents 0f685998 4a9d93ba
......@@ -47,12 +47,12 @@ module Gitlab
return unless log?
attributes = {
caller: caller,
pipeline_creation_caller: caller,
project_id: project.id,
pipeline_id: pipeline.id,
persisted: pipeline.persisted?,
source: pipeline.source,
duration_s: age
pipeline_persisted: pipeline.persisted?,
pipeline_source: pipeline.source,
pipeline_creation_service_duration_s: age
}.stringify_keys.merge(observations_hash)
destination.info(attributes)
......
......@@ -72,11 +72,11 @@ RSpec.describe ::Gitlab::Ci::Pipeline::Logger do
let(:loggable_data) do
{
'pipeline_id' => pipeline.id,
'persisted' => true,
'pipeline_persisted' => true,
'project_id' => project.id,
'duration_s' => a_kind_of(Numeric),
'caller' => 'source',
'source' => pipeline.source,
'pipeline_creation_service_duration_s' => a_kind_of(Numeric),
'pipeline_creation_caller' => 'source',
'pipeline_source' => pipeline.source,
'pipeline_save_duration_s' => {
'avg' => 60, 'count' => 1, 'max' => 60, 'min' => 60
},
......
......@@ -27,12 +27,12 @@ RSpec.describe Ci::CreatePipelineService do
let(:loggable_data) do
{
'caller' => 'Ci::CreatePipelineService',
'source' => 'push',
'pipeline_creation_caller' => 'Ci::CreatePipelineService',
'pipeline_source' => 'push',
'pipeline_id' => a_kind_of(Numeric),
'persisted' => true,
'pipeline_persisted' => true,
'project_id' => project.id,
'duration_s' => a_kind_of(Numeric),
'pipeline_creation_service_duration_s' => a_kind_of(Numeric),
'pipeline_creation_duration_s' => counters,
'pipeline_size_count' => counters,
'pipeline_step_gitlab_ci_pipeline_chain_seed_duration_s' => counters
......@@ -79,12 +79,12 @@ RSpec.describe Ci::CreatePipelineService do
context 'when the pipeline is not persisted' do
let(:loggable_data) do
{
'caller' => 'Ci::CreatePipelineService',
'source' => 'push',
'pipeline_creation_caller' => 'Ci::CreatePipelineService',
'pipeline_source' => 'push',
'pipeline_id' => nil,
'persisted' => false,
'pipeline_persisted' => false,
'project_id' => project.id,
'duration_s' => a_kind_of(Numeric),
'pipeline_creation_service_duration_s' => a_kind_of(Numeric),
'pipeline_step_gitlab_ci_pipeline_chain_seed_duration_s' => counters
}
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