Add metric to track locked states of environments
Summary
The metric being created in #20062 (closed) will have locked
as one of the states. The metric added in this issue will track why an environment is locked.
An environment can be locked by a deployment
, QA
, post-deploy migration
, failed_deployment
.
Proposal
-
Create a metric called auto_deploy_env_lock_state{target_env="", target_stage="", lock_reason=""}
. It gets set to 1 with the appropriate value in labellock_reason
when an environment is locked. -
Set the metric when environment is locked for deployment. -
Set metric when deployment fails. -
Set metric when QA starts, and unset it when QA ends. -
Set metric when environment is locked for post deploy migrations, and unset it when post deploy migrations completes.
Edited by Vladimir Glafirov