Skip to main content

Create Service Level Objectives

Service Level Objectives (SLOs) measure how reliably your services meet their targets. Coralogix supports three SLO types so you can match the SLO to the signal you actually want to track. Pick one, share the same creation workflow, and only diverge where the configuration genuinely differs.

Ready to get started?

Go to APM → SLO Center → + Create SLO and follow the steps in this guide.

Pick your SLO type​

TypeBest forSLI mechanismQuery style
APMService-level errors and latency on instrumented servicesBuilt-in: errors over total events, percentile or average latency against a thresholdPick a service and filters; Coralogix generates the PromQL
Event-basedReliability as a ratio of successful events to total eventsgood / total over the SLO time frameTwo queries: any two of good, bad, and total events
Time window-basedPass/fail per fixed interval, useful for sustained-latency targetsCount of windows that meet a threshold over total windowsOne PromQL query plus operator and threshold

What you need​

The metric you want to measure sent to Coralogix, either directly, or derived from logs and spans with Event2Metrics.

Step 1: Define the SLO​

In the Coralogix portal, go to APM, then SLO Center, and select + Create SLO.

Fill in the SLO details:

FieldDescription
NameThe unique name identifying your SLO. When you create an SLO, the name fills in from what it measures: for an APM SLO, the service and the SLO type (for example, checkout - Errors); for a custom SLO, the metric in its query. Type a name to replace the suggestion.
OwnerThe user responsible for maintaining and reviewing the SLO. Ownership defaults to the creator, but can be reassigned to any Coralogix team member.
Entity labels(Optional) Metadata used for filtering SLOs.
Description(Optional) Additional context or purpose of the SLO to clarify its scope and intent for other users. Set it under Advanced settings, at the bottom of the form.

Step 2: Select the SLO type​

Under SLO type, pick APM, Custom → Event-based, or Custom → Time window-based. If you pick APM, you then choose whether to track Errors or Latency.

Select SLO type

Step 3: Configure the SLO​

Select your SLO type to see its configuration steps. The remaining steps are shared across all types.

APM SLOs let you define reliability for a service without writing PromQL. Track a service's error rate against a target.

  1. Select a service to associate with the SLO.

  2. Apply Filters: narrow the scope of the SLO using label selections.

  3. Pick a Grouping Key: select one or more labels to split the SLO into permutations (for example, service_name, route). Each unique combination of label values becomes its own permutation, tracked independently. Available labels come from the selected service.

  4. Define the time frame and target success rate in Step 4: Set the target and time frame.

    The Configuration section of an APM Errors SLO with the adservice service selected, a Filtered by condition, and error as the grouping key

Tip
  • Filters can be adjusted through the builder.
  • To preview the underlying PromQL query that Coralogix generates from your APM SLO configuration, select the Show query icon in the top-right of the Configuration section. The query updates as you change the configuration.

Step 4: Set the target and time frame​

Define:

  • Time frame: the compliance window the SLO is judged over.

    Rolling: 1, 7, 14, 21, 28, or 30 days. The 1-day window applies the same rolling logic as the longer windows, evaluating compliance, error budget, and status over the trailing 24 hours. The time frame is the span an SLO is judged over, not a view of current health: a breach early in the window keeps counting until it rolls out. A 1-day time frame suits services where a longer window would hide a short regression. On low-traffic services, a 1-day window holds few events, so a handful of failures can spend the whole budget; a time window-based SLO is often a better fit there.

    Calendar month: evaluates the SLO over the current calendar month in UTC, from the 1st up to now, and starts over with a full error budget at the start of each month. In the time frame menu, select current calendar month, so the form reads Evaluate within the current calendar month. Through the SLO API, set SLO_TIME_FRAME_CALENDAR_MONTH as the time frame. In the SLO Center grid and charts, the time frame shows as 1 calendar month. Use it when you plan and report reliability per calendar month rather than over the last N days. Keep in mind:

    • Months differ in length: the window runs 28 to 31 days, depending on the month.
    • Early in the month, the window is partial: on the 3rd, the SLO is judged on less than 3 days of data, so compliance and error budget move more than they do over a full rolling window. The error budget is measured against the time elapsed in the month, not the month's full length.
    • Exclusion windows shorten the measured time: an exclusion window inside the month reduces the time the SLO is measured over, not the month's length.
    • The preview covers the last 28 days: while you create a calendar-month SLO, the preview evaluates the last 28 days, because the month so far may hold too little data. After you save, the SLO evaluates the current calendar month.
  • Target success rate: the percentage required to meet the SLO (for example, 99.9%).

The Set your SLO time frame and target section of the SLO form with the time frame menu open, listing 1, 7, 14, 21, 28, and 30 days and current calendar month, and a target of 99%

These parameters bound the error budget and keep reliability goals aligned with operational requirements.

When data collection starts

Data collection for the SLO's metric begins at SLO creation. Initial calculations cover only data from that point onward. The same applies when you later change the SLO's SLI or target, which starts a new revision. Once the SLO is older than its time frame, the system evaluates a full rolling window.

Step 5: Add exclusion windows​

An exclusion window is a time range left out of an SLO's evaluation. Use it for planned downtime, so a maintenance job or a planned migration isn't held against the SLO's compliance or error budget. Windows are defined per SLO, and each window has its own time zone, UTC by default. Set it under Advanced settings, at the bottom of the form.

When to use an exclusion window​

  • Recurring maintenance: a weekly patch window, a nightly backup, or any other work that repeats on a fixed schedule.
  • One-time planned work: a database migration, an infrastructure move, or a load test with a known start and end.

Exclusion windows are for planned work only. A window must start in the future, so you can't add one after an incident to remove it from the SLO.

Add a window​

The Exclusion windows editor configuring a daily recurring window for planned maintenance in the America/New_York time zone, with the preview Every day 00:00–01:00 America/New_York

  1. In the create or edit form, expand Advanced settings, then, in the Exclusion windows section, select Add window.
  2. Set the Exclusion type:
    • Recurring: repeats on a schedule. Set a Start date and time, a Recurrence interval, and a Duration. To end the series on a date, select Set termination date.
    • One-time: applies once. Set a Start, then set the End as either a date and time or a duration.
  3. Enter a Reason, such as planned maintenance.
  4. Select the Time zone the window's dates and times are in. It starts on UTC. Type a city to search, for example new york.
  5. To add more windows, select Add window again.
  6. Save the SLO.
FieldApplies toDescription
StartRecurring and one-timeThe date and time the window first applies, in the window's time zone. Must be in the future.
Recurrence intervalRecurringHow often the window repeats, measured from the start of one occurrence to the start of the next: a whole number of hours, days, or weeks.
DurationRecurring, and one-time when the end is a durationHow long each occurrence lasts: a whole number of minutes, hours, or days. For a recurring window, it must be shorter than the recurrence interval.
Termination dateRecurring, optionalThe last day the series runs. The date covers the whole day in the window's time zone, so it can be the same day as the start. Without one, the window repeats until you deactivate it.
EndOne-timeWhen the window stops: a date and time after the start, or a duration.
ReasonRecurring and one-timeRequired, up to 256 characters. Shown on the window and in the SLO Center grid, so make it specific, for example Weekly database patching.
Time zoneRecurring and one-timeThe time zone for the window's start, end, and termination date. Defaults to UTC. Changing it keeps the date and time you typed and reads them in the zone you select.

Check the schedule preview​

As you fill in the schedule, a preview shows when the window applies, so you can confirm it before you save. For example:

SettingsPreview
Recurring, starts on a Monday at 02:00, every 1 week, for 1 hourEvery Monday 02:00–03:00 UTC
Recurring, starts at 00:00, every 2 weeks, for 1 hourEvery 2 weeks 00:00–01:00 UTC
Recurring, starts at 22:00, every 1 day, for 30 minutes, time zone Asia/JerusalemEvery day 22:00–22:30 Asia/Jerusalem

When you set a termination date, the preview adds until and that date. A one-time window shows its date and its start and end times. Every preview ends with the window's time zone, and saved windows show their times in that zone too.

To match local maintenance hours, select the local time zone instead of converting the times to UTC. For example, for a job that runs at 02:00 in New York, select America/New_York and enter 02:00.

Recurring windows and daylight saving time

A recurring window repeats at fixed UTC times. In a time zone that changes its clocks, the window starts one hour earlier or later in local time after the change, while its schedule still shows the local time you entered. If the window must line up with a local maintenance job all year, check it after each clock change.

How exclusion windows affect the SLO​

  • Evaluation skips the window: time inside an active window is left out of the SLO's compliance, error budget, and status.
  • Only future time is excluded: a window applies from the time you save it onward. Past results are never recalculated.
  • No new revision: adding or deactivating a window doesn't start a new revision of the SLO.
  • Visible in the SLO Center: windows show in the Exclusion windows grid column, on the 30-day health calendar, and on the 7-day status trend. See Exclusion windows.

Limits​

  • Each team can have up to 200 live exclusion windows across all its SLOs. A live window is one that is active now or still has occurrences ahead.
  • Saved windows can't be edited. To change one, deactivate it and add another window.

After you save, manage these windows and see where they appear from the SLO Center.

Step 6: Tag SLO permutations with ownership​

Use Ownership tags to identify who owns each permutation of a grouped SLO. Each permutation can carry Service, Environment, and Team tags. Set values for the whole SLO group, or derive them from labels in the query so the tags follow the data.

Set it under Advanced settings, at the bottom of the form. A spinner appears in the Ownership tags title while the SLO configuration is being validated.

For an APM SLO, the Service tag starts with the services you picked in the configuration and follows them as you change the selection. Edit the tag to set your own value.

Ownership tags card

For each of the three dimensions. Service, Environment, and Team: pick how to assign the tag:

ModeDescription
Manual valueApply fixed values to every permutation in the SLO group. For Service, pick one or more services already reported to your account. For Environment and Team, type a single value (for example, prod, payments).
Label valueThe tag values are read from labels in the SLO's query, so each permutation can carry a different owner. Pick one or more label keys from the dropdown; only label keys available in the current query are listed.

To clear a row, select the ✕ icon next to its value.

Note

Ownership tags label permutations; they do not create them. To split the SLO into permutations, use grouping in your query.

Step 7: Preview and validate​

The Preview panel validates your SLO in real time, ranks the worst-performing permutations, and surfaces AI-generated suggestions for the target, metric fit, and query shape. For details, see Preview and validate SLOs.

Quick summary:

  • Query validation: real-time checks with pass, warning, and fail statuses.
  • SLO smart-tip: AI-suggested target, metric-fit analysis, and query-shape guidance.
  • Status: the worst-performing permutations ranked by compliance, with per-permutation good/total counts and an overall state against your target.

Step 8: Save the SLO​

  • Select Create (or Save) to store the SLO.
  • Or select Save & create alert to immediately set up alerting based on the new SLO.

Only two things stop you from saving: a missing required field (such as the Name or Target) or a query that can't parse or run. Every other check in Query validation is advisory: a query that returns no data, or one that raises a warning, still saves. This lets you track valid but unconventional SLIs instead of having the form reject them.

SLO calculation example​

For an APM SLO with a 99% target evaluated over 7 days:

  • Total requests: 10,000
  • Threshold violations: 52

Current state:

SLI = (10000 − 52) / 10000 × 100 = 99.48%

The error budget allows 1% of requests to violate the threshold, 100 violations out of 10,000. After 52 violations, 48 remain.

Remaining budget = (100 − 52) / 100 × 100 = 48%

Query examples​

APM SLOs don't require you to write queries. When you select a service and choose Errors or Latency, Coralogix generates the underlying PromQL for you: the Good events and Total events queries for Errors, or the Window query for Latency. The generated queries run on span metrics (request counts for Errors, duration histograms for Latency). To view the exact PromQL for your configuration, select Show query in the APM step (Step 3).

Limitations​

When an SLO is first created, data collection for its metric begins at that point in time. Initial calculations are based solely on data from the moment of creation onward. Once the SLO age exceeds its time frame, the system uses the full SLO time frame as a rolling window.

Additional resources​

Use recording rule–based metrics safely in your SLO creation: see Recording rule–based metrics.

Next steps​

Learn how to evaluate the SLO in real time in Preview and validate SLOs, then set up notifications with SLO alerts.

Last updated on