You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a pipeline owner, I'd like metrics whenever my pipeline is blocked. The best built-in mechanism for this today in AWS is to publish an event on detail "CodePipeline Pipeline Execution State Changed" with state "FAILED"; then create an alarm around the AWS Events metrics for this rule. The problem is that this metric only exists when there is a state change, which means that the state of the alarm does not reflect the current state of the pipeline.
Solution
By having the enforcer emit metrics on every execution as to the state of the pipeline, we get a steady stream of metric values that can be used for continuous monitoring of the pipeline's health, without incurring AWS Events involvement.
Requirements
Ergonomics
DeploymentSafetyEnforcer should accept a new setting for "pipelineMetrics" that allows the customer to enable/disable the feature. Because we are publishing custom metrics, which are not free, we do not want to enable by default
The pipeline metrics configuration should allow the customer to override the CloudWatch metrics namespace, with default value DeploymentSafetyEnforcer.
Construct should expose a metricPipelineFailed() method, akin to CDK's DynamoDB Table construct, which exposes the metric value for easy alarm creation (alarm creation is outside the scope and better suited for cdk-monitoring-constructs).
Metric should use PipelineName as the dimension
To start, metric name should be PipelineBlocked
Potentially, in the future, we may enable more fine-grained metrics such as "StageBlocked", etc.
The text was updated successfully, but these errors were encountered:
Problem
As a pipeline owner, I'd like metrics whenever my pipeline is blocked. The best built-in mechanism for this today in AWS is to publish an event on detail "CodePipeline Pipeline Execution State Changed" with state "FAILED"; then create an alarm around the AWS Events metrics for this rule. The problem is that this metric only exists when there is a state change, which means that the state of the alarm does not reflect the current state of the pipeline.
Solution
By having the enforcer emit metrics on every execution as to the state of the pipeline, we get a steady stream of metric values that can be used for continuous monitoring of the pipeline's health, without incurring AWS Events involvement.
Requirements
Ergonomics
DeploymentSafetyEnforcer
should accept a new setting for "pipelineMetrics" that allows the customer to enable/disable the feature. Because we are publishing custom metrics, which are not free, we do not want to enable by defaultDeploymentSafetyEnforcer.
metricPipelineFailed()
method, akin to CDK's DynamoDB Table construct, which exposes the metric value for easy alarm creation (alarm creation is outside the scope and better suited for cdk-monitoring-constructs).PipelineName
as the dimensionPipelineBlocked
Potentially, in the future, we may enable more fine-grained metrics such as "StageBlocked", etc.
The text was updated successfully, but these errors were encountered: