Cloud Automation Release validation
Our Site Reliability Guardian incorporates the Cloud Automation use cases. To ensure an optimal experience, we recommend upgrading your environment or contacting your account team for assistance.
For more information, see Upgrade from Cloud Automation to Site Reliability Guardian.
With Cloud Automation, you can use quality gates to automatically validate your builds, deployments, and releases based on service-level objectives (SLOs). Cloud Automation quality gates are based on Keptn, a Cloud Native Computing Foundation open-source project.
Quality gates are benchmarks in the software delivery lifecycle that define specific, measurable, and achievable success criteria that a service must meet before it is advanced to the next phase of the software delivery pipeline. Quality gates can validate any service-level objective (SLO), giving you the ability to ensure automated and consistent evaluation of software quality.
Establishing clear, consistent, and effective quality gates that are automatically validated at each phase of the delivery pipeline is essential for improving software quality and speeding up delivery.
Dynatrace Cloud Automation is licensed based on the consumption of Cloud Automation units (CAUs). For details, see Cloud Automation monitoring (CAUs).
Connect a service with a quality gate
To enable Cloud Automation quality gates for a specific Dynatrace-monitored service, you need to connect your service with quality gates by adding two specific tags (
keptn_service) to the service in Dynatrace. This automatically adds the service to the
dynatrace Cloud Automation project and
quality-gate stage. Targeting a different project or stage isn't possible. To display a quality gate result in the release inventory, two additional tags (
keptn_stage) are required.
- In the Dynatrace menu, go to Services and select the service you want to connect with Cloud Automation quality gates.
- Expand Properties and tags.
- Select Add tag and enter these four tags:
When entering the value, be sure you use lowercase and that there are no spaces between words or special characters.
For more information about tagging, see Best practices and recommendations for tagging.
View Dynatrace services in the Cloud Automation bridge
After adding the above-mentioned tags to your service, the service will show up in the Cloud Automation bridge.
To view the service
Sign in to the Cloud Automation bridge.
- Select the Dynatrace project.
- Select the Services button.
Automatic synchronization takes place every minute.
Customize quality gate with dashboards
After connecting a service with a quality gate, you can customize the quality gate configuration by using a Dynatrace dashboard and supported tiles. Cloud Automation analyzes the dashboard and automatically creates the SLIs and SLOs that define the quality gate configuration.
Add and configure dashboards
To add and configure a dashboard for quality gate evaluations
In the Dynatrace menu, go to Dashboards and select Create dashboard.
For Dashboard name, use the following pattern:
KQG;project=<project>;service=<service>;stage=<stage>. Be sure to replace the placeholders (
<...>) with real values derived from your Cloud Automation instance (example:
Select Edit to edit the dashboard.
Add and configure any of the following tiles:
To exclude a tile from the quality gate evaluation, add the key-value pair
exclude=true to the tile title. For example, a
Response time; exclude=true title excludes the Response time tile from the quality gate evaluation.
You can use the Markdown tile to configure the comparison and scoring strategy.
By default, Cloud Automation performs a quality gate evaluation using the following comparison and scoring properties:
1comparison:2 compare_with: "single_result"3 number_of_comparison_results: 14 include_result_with_score: "pass"5 aggregate_function: avg6total_score:7 pass: 90%8 warning: 75%
To override the default values, add a Markdown tile to the dashboard with one of the following semicolon-separated key-value pairs:
|Key||Data type (restriction)||Description|
|Number (> ||Use |
|String (||Use |
|String (||Use |
|Number (with optional ||Use |
|Number (with optional ||Use |
While you can have multiple Markdown tiles on the dashboard, be sure to have one Markdown tile to configure comparison and scoring. This Markdown tile must consist of key-value pairs only.
You can use the SLO tile to define a metric with its target and warning state.
An SLO tile will produce an SLI with the same name as the underlying SLO. The SLO's target and warning thresholds are mapped to the
Warning criteria. Querying remote environments or using custom management zones or timeframes is not supported.
Data explorer tiles
You can use Data explorer tiles to define a metric and its thresholds for
Data explorer tiles must include a single query (one metric). Metric selectors provided via the Advanced mode are supported.
The Data explorer tile allows you to define thresholds that are used when evaluating this metric as part of the quality gate evaluation. To define the
Fail criteria, you must define the threshold colors and values. The threshold values depend on the selected metric and must be strictly monotonically increasing. The threshold colors have to reflect the following state order:
|Good ✓||Bad ✗|
To select a color for the quality gate evaluation state, open the color panel and select one of the available cell colors. Any configuration that uses different colors will fail.
Available cell color range:
To configure the thresholds for validating a metric, you can define the metric unit. As a result, the metric value is correctly converted from the base unit to the selected metric unit.
You can use the Problems tile to derive the current number of problems when executing a quality gate evaluation.
A Problems tile on the dashboard is mapped to an SLI called
Problems with the total count of open problems.
Link the new dashboard to your Cloud Automation instance
To link the new Dynatrace dashboard (which represents the quality configuration) to your Cloud Automation instance
Retrieve your current
dynatrace.conf.yamlconfiguration file or, if you don't have one, create it.
dynatraceproject, create a
dynatrace.conf.yamlfile with the following content:1spec_version: '0.1.0'
Adapt the configuration file by adding the
dashboardproperty and its value.
To set the value, you have two options:
You can set the
<dashboard-uuid>value to link to the UUID of a specific dashboard.
Example:1spec_version: '0.1.0'2dashboard: 67767627-1684-443c-b0f3-751a7256bff
The UUID is the last part of your dashboard URL in Dynatrace (the string after
id=). For example, in the URL
https://abc123a.dynatrace.com/#dashboard;gtf=-2h;gf=all;id=67767627-1684-443c-b0f3-751a7256bff, the UUID is
Upload the updated configuration file (which will override an existing one). Run the command below, making sure to replace
<your_service_name>with the name of your service.1keptn add-resource --project=dynatrace --stage=quality-gate --service=<your_service_name> --resource=dynatrace.conf.yaml --resourceUri=dynatrace/dynatrace.conf.yaml
Trigger quality gate evaluations
After connecting your Dynatrace-monitored service with Cloud Automation quality gates, you can trigger quality gate evaluations.
How the evaluation works:
Cloud Automation queries service-level indicators from Dynatrace and compares them against service-level objectives. If the objectives are met, the quality gate evaluation is
succeeded. Otherwise, the evaluation is
Cloud Automation quality gate automates the validation of different software versions or builds. To evaluate different software versions or builds, you can run multiple quality gates.
Run the command below, making sure to replace
<your_service_name>with your service name
<your_service_build_number>with the service build number you want to evaluate
<evaluation_timeframe>with the desired evaluation timeframe
<release_version>with the release version
1keptn trigger evaluation --project=dynatrace --stage=quality-gate --service=<your_service_name> --timeframe=<evaluation_timeframe> --labels=buildId=<your_service_build_number>,releasesVersion=<release_version>,executedBy=manual
1keptn trigger evaluation --project=dynatrace --stage=quality-gate --service=iampapservice --timeframe=10m --labels=buildId=4711,releasesVersion=0.1.1,executedBy=manual
In the example above, we trigger a quality gate evaluation of build
4711 of your
IAM PAP Service service running in the
quality-gate stage of your
dynatrace project during a 10-minute timeframe.
To compare between two builds, you can trigger another evaluation. Run the same command, replacing the
buildID value with the desired value.
For more information on the concepts of
service in the Cloud Automation context, see Definition of project, stage, and service.
View quality gate evaluation results
Cloud Automation bridge
After running the quality gate evaluation, you can view evaluation results on the Cloud Automation bridge in Services. When you select a service, a heatmap and a chart appear on the evaluation board, displaying the evaluation comparison for the
For more information, see Services view.
The release inventory displays the quality gate result by showing a colored traffic light. Select the link next to the traffic light to open the Cloud Automation bridge for more details on the quality gate result.
To make this work, make sure to
- Add the four tags (
keptn_stage) to the service as explained above.
- Add the label
releasesVersionwith the right release version when triggering a quality gate.
For additional insights into Dynatrace quality gates, check our Dynatrace University tutorials: