in lib/release_tools/pipeline_tracer/metrics_service.rb [34:55]
def execute
logger.info('Gathering duration metrics for pipeline', pipeline: pipeline.url)
raise InvalidDepthError, "Depth must be between 0 and #{MAX_DEPTH}" unless depth.between?(0, MAX_DEPTH)
return if SharedStatus.dry_run?
unless pipeline.end_time
logger.info('Not generating duration metrics for pipeline since end_time is unknown', pipeline_url: pipeline.url)
return
end
metrics_client.set('deployment_pipeline_duration_seconds', pipeline.real_time_duration, labels: pipeline_duration_labels)
observe_duration_as_histogram
return if depth < 1
process_pipeline_jobs
process_downstream_pipelines
end