Your classic SLOs have been running for years, but their metric expressions are getting hard to maintain and the team wants to drive everything with DQL. You cannot migrate SLOs to Grail in one click: each objective has to be rewritten, compared and then switched over without losing track of the error budget. This tutorial shows how to migrate SLOs to Grail one at a time, without breaking your alerts.

Goal: by the end you will have an inventory of your classic SLOs, their DQL equivalent on Grail, a side-by-side run proving that both calculations agree, and a strategy to switch your alerts. This applies to Dynatrace SaaS: the upcoming SLOs rely on Grail, which does not exist on Dynatrace Managed. On Managed you stay on classic SLOs; the dedicated section below explains what to prepare.

If you are starting from scratch with indicators, first read how to choose your SLIs with DQL.

It has been revealed that A classic SLO computes its ratio from a metric expression (for example builtin:service.errors.total.successCount divided by builtin:service.requestCount.total). An SLO on Grail computes its ratio from a DQL query. The two engines do not necessarily aggregate the same way: resolution, handling of data gaps, entity scope. Without a comparison, you risk switching to an SLO that reveals 99.95% where the old one indicated 99.80%, hiding real budget consumption.

The classic SLO API v2 returns the paginated list, with the target, the timeframe and the metric expression.

The critical fields: target (the target, for example 99.9), timeframe (for example -30d) and metricExpression, the formula to translate. If the response contains a nextPageKey, call again with that parameter.

Do not migrate everything. Put each inventory line into one of three groups:.

Take a classic success-rate SLO for a service. On Grail, service metrics are exposed under keys such as dt.service.request.count and dt.service.request.failure_count. The following query computes the SLI over the same period:.

Then create the SLO in the app: paste the query and reuse exactly the same target and timeframe as the classic SLO. Changing the target during the migration would make the comparison useless.

Recent findings suggest that keep both SLOs active for at least one full window, ideally two. Compare the values every day. On the classic side, the API returns the evaluation:.

On the Grail side, reuse the query from step 3 and aggregate over the full window:.

Accept a small gap (a few hundredths of a point) caused by aggregation differences. A larger gap almost always means a different scope: an added service, a forgotten key-request filter, or synthetic requests counted on one side and not the other.

It has been revealed that the migration is only finished when on-call is alerted by the upcoming SLO. Reuse the multi-window logic described in SLO burn rate alerts in Dynatrace, applied to the Grail SLO. Enable the new alert, keep the old one running in parallel for a few days, then disable the old one. Only delete the classic SLO after exporting its history if your monthly reports depend on it.

If you manage SLOs as code, update your Terraform definitions instead of clicking in the UI: see Dynatrace SLOs with Terraform. Check in the provider documentation which resource maps to the new SLOs, as it differs from the classic SLO resource.

Dynatrace Managed has no Grail: the new SLOs are not available there. You can still prepare a future move to SaaS:.

In a recent development, capabilities change between Dynatrace SaaS versions. Check the official documentation to see whether a conversion assistant is offered in your environment. Even with an assistant, the side-by-side run remains essential to validate the numbers.

In a recent development, the new SLO recomputes its SLI from the data held in Grail, according to your metric retention. The classic SLO history is not transferred as is. Export it if you need it for reports.

Sources indicate that yes, and during the transition it is even recommended. In the long run, avoid two sources of truth for the same objective: on-call must know which number counts.

To migrate SLOs to Grail, first triage, then rewrite each SLI in DQL, compare over a full window and only then switch the alerts. This discipline stops you « gaining » reliability points just by changing the calculation, and keeps the error budget honest.

span.observer is an independent community blog, not affiliated with Dynatrace LLC. Dynatrace is a trademark of its owner. SaaS features evolve quickly: check their availability in your environment and in the official documentation.

According to recent reports, originally published on span.observer. French version: https://span.observer/fr/migrer-slo-grail-dynatrace/.

β†’ Read original article