in lib/release_tools/pipeline_tracer/metrics_service.rb [60:77]
def observe_duration_as_histogram
return if pipeline.details.name.nil?
pipeline_name = pipeline.details.name
metric_name = if pipeline.project == Project::ReleaseTools.ops_path && pipeline_name.starts_with?('Deployment pipeline')
'deployment_coordinator_pipeline_duration_seconds'
elsif pipeline.project == Project::OmnibusGitlab.dev_path && pipeline_name == 'AUTO_DEPLOY_BUILD_PIPELINE'
'deployment_packager_omnibus_pipeline_duration_seconds'
elsif pipeline.project == Project::CNGImage.dev_path && %w[AUTO_DEPLOY_BUILD_PIPELINE AUTO_DEPLOY_TAG_BUILD_PIPELINE].include?(pipeline_name)
'deployment_packager_cng_pipeline_duration_seconds'
end
return if metric_name.nil?
metrics_client.observe(metric_name, pipeline.real_time_duration, labels: pipeline_duration_histogram_labels)
end