Commit 4a9d93ba authored by Marius Bobin's avatar Marius Bobin

Rename other keys from the pipeline logger

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