Skip to content

Add target_env and target_stage labels for pipeline_duration metric

What does this MR do and why?

Describe in detail what your merge request does and why.

Add target_env and target_stage labels for the pipeline_duration metric.

Use the pipeline variables API to get the DEPLOY_ENVIRONMENT variable. The value of the variable is the environment string.

At time of committing, the gitlab gem does not support the pipeline variables API, so we need to call the gem's get method with the API path.

gitlab-com/gl-infra/delivery#2905 (closed)

Author Check-list

  • Has documentation been updated?
Edited by Reuben Pereira

Merge request reports