{"slug": "how-to-set-up-an-slo-with-opentelemetry-and-your-ai-coding-agent", "title": "How to set up an SLO with OpenTelemetry and your AI coding agent", "summary": "Dash0 published a five-prompt guide for configuring a service level objective (SLO) in its observability platform using an AI coding agent such as Claude Code, Cursor, Windsurf or Copilot CLI, with the example SLO set at 99.5% of requests succeeding over 28 days. The guide instructs users to supply one All-permissions auth token, the OTLP/HTTP ingress host and API host from Settings > Endpoints, and a dataset, then paste prompts sequentially so the agent adds OpenTelemetry instrumentation, sends about 20 test requests including one deliberate failure, and writes a YAML SLO definition. Dash0 says the approach works with any language, infrastructure-as-code and CI because each prompt tells the agent to read the existing code first.", "body_md": "**The short version:** you paste five prompts into your AI coding agent, one at a time. The agent does the work. After each prompt, you open Dash0 and check one thing. At the end, your service has an SLO, alerts that tell you when it's in trouble, and a marker for every deploy.\n\nIt works with any language, any infrastructure-as-code and any CI, because every prompt tells the agent to read your code first.\n\n**Get the prompts here:** [five-prompt guide](https://docs.google.com/document/d/1URvGVzfjMIOdP8TXfqfVgkzUdsAycE4K4WxMySwJMjA/edit). This post walks through what each prompt does and what you should see in Dash0. Every screenshot below comes from SLO Coach, a real app we built and monitor in Dash0.\n\n## [What is an SLO?](#what-is-an-slo)\n\nAn SLO (service level objective) is a promise about how often your service works.\n\nFor example: \"99.5% of requests succeed over 28 days.\"\n\nThat leaves 0.5% of requests that are allowed to fail. That allowance is your error budget. Think of it like a monthly data plan: you can use some, but you don't want to run out.\n\n**Burn rate** is how fast you're using the budget. A burn rate of 1 means you'll use it up exactly at the end of the 28 days. A burn rate of 10 means you're using it 10 times too fast.\n\n## [Before you start: get 3 things from Dash0](#before-you-start-get-3-things-from-dash0)\n\nYou need three things. If you don't have a Dash0 account yet, start a free trial at dash0.com/sign-up.\n\n- **One auth token.** Ask an org Admin to create it under Settings > Auth Tokens. Give it**All permissions** on the dataset you'll use. That one token works for everything in this guide.\n- **Two addresses (endpoints).** Copy them from Settings > Endpoints: the OTLP/HTTP ingress host (where your telemetry goes) and the API host (where the SLO goes). Mixing these two up is the most common reason nothing shows up.\n- **A dataset.** The Default dataset works. Use the same dataset for everything.\n\n**Keep your token safe.** Put the values in a .env file that's listed in .gitignore, and keep the token in a password manager so the agent never sees it.\n\n**Tip for production:** later, you can split the token in two: an ingest-only token for your app and CI, and the All-permissions token just for creating SLOs.\n\n## [Start your agent](#start-your-agent)\n\nOpen your AI coding agent (Claude Code, Cursor, Windsurf, Copilot CLI or similar) in the folder where your app lives. If your infrastructure or your CI pipeline live in other folders, add those too.\n\nPaste the guide's opening message first. The agent will ask you where everything lives, and it will use the same three names everywhere: service.name, service.namespace and service.version. Every step after this depends on those names matching.\n\n## [Step 1: Add OpenTelemetry to your app](#step-1-add-opentelemetry-to-your-app)\n\n**What you paste:** prompts 1a and 1b from the guide.\n\n**What the agent does:**\n\n- Finds your language and framework, and adds the official OpenTelemetry setup for it.\n- If your app already has some OpenTelemetry, it cleans it up instead of adding a second copy.\n- Sets the same names on the deployed app in your infrastructure code.\n\n**Good to know:** the token comes from the secret store your platform already uses, never from a Terraform variable.\n\n## [Step 2: Send data to Dash0 and check it arrived](#step-2-send-data-to-dash0-and-check-it-arrived)\n\n**What you paste:** prompt 2.\n\n**What the agent does:** points your app at Dash0, sends about 20 test requests (including one that fails on purpose), and checks that they arrived.\n\n**What you should see:** open **Services** in Dash0 and click your service. You should see requests, errors and duration.\n\n**If you see nothing:** check that you used the ingress host (not the API host) and the right dataset.\n\n## [Step 3: Create the SLO](#step-3-create-the-slo)\n\n**What you paste:** prompt 3.\n\n**What the agent does:** writes a small YAML file that describes your SLO and sends it to Dash0. You don't write any queries yourself. Dash0 does the math.\n\nThe rule is simple:\n\n- **Good requests** = requests that didn't fail.\n- **All requests** = every request.\n- **Target** = 99.5% of requests should be good.\n\n**What you should see:** open **SLOs**, click your new SLO, then the **Settings** tab. It shows exactly what's being counted.\n\nHere's the real file behind it:\n\n```\napiVersion: openslo.com/v1\nkind: SLO\nmetadata:\n  name: slo-coach-availability\n  labels:\n    dash0.com/origin: slo-coach-availability\nspec:\n  description: 99.5% of requests to the SLO Coach web app succeed without a server error, measured over the last 28 days.\n  service: \"slo-coach/slo-coach\"\n  budgetingMethod: Occurrences\n  timeWindow:\n    - duration: 28d\n      isRolling: true\n  indicator:\n    metadata:\n      name: slo-coach-availability\n    spec:\n      ratioMetric:\n        counter: true\n        good:\n          metricSource:\n            type: Prometheus\n            spec:\n              query: '{otel_metric_name=\"dash0.spans\", service_namespace=\"slo-coach\", service_name=\"slo-coach\", deployment_environment_name=\"production\", otel_span_kind=\"SERVER\", otel_span_status_code!=\"ERROR\"}'\n        total:\n          metricSource:\n            type: Prometheus\n            spec:\n              query: '{otel_metric_name=\"dash0.spans\", service_namespace=\"slo-coach\", service_name=\"slo-coach\", deployment_environment_name=\"production\", otel_span_kind=\"SERVER\"}'\n  objectives:\n    - displayName: 99.5% availability\n      target: 0.995\n```\n\n**Then open the Overview tab.** You'll see your target, how much error budget is left, and how you're doing over the last 2 hours, 24 hours, 7 days and 28 days.\n\n**Good to know:**\n\n- Charts start empty. Dash0 starts measuring when you create the SLO and doesn't fill in the past. Give it a few minutes.\n- The SLO is read-only in the UI because it was created from code. To change it, edit the YAML and send it again.\n\n## [Step 4: Mark every deploy on the SLO](#step-4-mark-every-deploy-on-the-slo)\n\n**What you paste:** prompt 4.\n\n**What the agent does:** adds one step to your CI pipeline. Every time you deploy, it tells Dash0 \"a new version just went out\", whether the deploy worked or failed.\n\n**What you should see:** a small rocket icon on the SLO's charts. Hover over it to see which version went out, where, and whether it succeeded.\n\n**If there's no rocket:** the deploy event must use exactly the same service.name, service.namespace and dataset as the SLO. Check them letter by letter.\n\n## [Step 5: Get alerted when the budget burns too fast](#step-5-get-alerted-when-the-budget-burns-too-fast)\n\n**What you do:** open your SLO and click **Create check rule**. Dash0 fills in the rule for you. Click **Save**.\n\nThat rule fires when you're burning budget too fast. If you want two levels, save the rule, clone it, and keep one signal in each copy:\n\n| Signal | What it means | Send it to | \n|---|---|---|\n| Fast burn | Something you just shipped is hurting users right now | Paging | \n| Slow burn | A small, quiet problem that will break your promise before the 28 days are up | Your ticket queue | \n\nFor the curious, the exact thresholds: fast burn fires at 13.44x normal over 1 hour (confirmed over 5 minutes) or 5.6x over 6 hours (confirmed over 30 minutes). Slow burn fires at 2.8x over 1 day (confirmed over 2 hours) or 1x over 3 days (confirmed over 6 hours).\n\n## [How to read your SLO after a deploy](#how-to-read-your-slo-after-a-deploy)\n\nAfter your next deploy, open the SLO and look at the **Burn rate** chart next to the rocket icons.\n\n- **Flat line after the rocket:** the deploy is fine.\n- **Line jumps up right after the rocket:** that deploy is the first thing to check. Use**More actions > View bad events in Traces** to see the failing requests.\n\n## [One SLO for several services](#one-slo-for-several-services)\n\nSome promises cover more than one service. For example, \"checkout works\" might depend on the frontend, the cart and the checkout service. You can put them all behind one SLO in the Dash0 UI:\n\n1. Open **SLOs** and create a new SLO.\n2. Pick **Good / Total** or**Bad / Total** .\n3. Set **Service** to**No service** . Do this first, or the next step won't show up.\n4. Under **Event scope > Filters** , add**service.name** and tick every service you want.\n\n## [Adding a latency SLO](#adding-a-latency-slo)\n\nA latency SLO is a promise about speed, for example \"99% of requests finish in under 300 ms\". It uses the same YAML file with a different rule inside. The guide has a prompt that picks a sensible threshold from how fast your service is today.\n\n## [Frequently asked questions](#frequently-asked-questions)\n\n### [Which AI coding agents does this work with?](#which-ai-coding-agents-does-this-work-with)\n\nClaude Code, Cursor, Windsurf, Copilot CLI and similar agents. The prompts carry every rule the agent needs, so you don't install anything else.\n\n### [Do I need an OpenTelemetry Collector?](#do-i-need-an-opentelemetry-collector)\n\nNo. Your app sends data straight to Dash0. If your Kubernetes cluster runs the Dash0 operator, it handles the address and the token for you.\n\n### [Why does my new SLO show no data?](#why-does-my-new-slo-show-no-data)\n\nDash0 starts measuring when you create the SLO, with a 5-minute delay, and doesn't fill in the past. If it's still empty after that, make sure your service is getting requests in the same dataset and environment as the SLO.\n\n### [Why is there no deployment marker on my SLO?](#why-is-there-no-deployment-marker-on-my-slo)\n\nThe marker only shows up when the deploy event's service.name, service.namespace and dataset match the SLO exactly. In Dash0, open Logs, filter on otel.event.name = dash0.deployment, and compare the names letter by letter.\n\n### [How many SLOs can I create?](#how-many-slos-can-i-create)\n\n25 SLOs per organization are included. Start with five, on the services your customers would notice first if they broke.\n\n## [Build one with us](#build-one-with-us)\n\nOpen the [five-prompt guide](https://docs.google.com/document/d/1URvGVzfjMIOdP8TXfqfVgkzUdsAycE4K4WxMySwJMjA/edit) and point your agent at a service you own. Or join the hands-on SLO Workshop, From Zero to SLO in Five Prompts, on Thursday 5 November 2026 at 11:00 ET, and we'll do the five prompts together. [Register link](https://dash0.com/event/from-zero-to-slo-in-five-prompts)\n\nRelated docs: [About SLOs](https://dash0.com/docs/dash0/monitoring/alerting/slos), [Create SLOs](https://dash0.com/docs/dash0/monitoring/alerting/create-slos), [Alert on SLOs](https://dash0.com/docs/dash0/monitoring/alerting/alert-on-slos), [Manage SLOs as code](https://dash0.com/docs/dash0/monitoring/alerting/manage-slos-as-code).", "url": "https://wpnews.pro/news/how-to-set-up-an-slo-with-opentelemetry-and-your-ai-coding-agent", "canonical_source": "https://dash0.com/blog/set-up-slo-opentelemetry-ai-coding-agent", "published_at": "2026-11-04 15:29:57+00:00", "updated_at": "2026-11-04 16:21:53.477305+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "mlops"], "entities": ["Dash0", "OpenTelemetry", "Claude Code", "Cursor", "Windsurf", "Copilot CLI", "SLO Coach"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/how-to-set-up-an-slo-with-opentelemetry-and-your-ai-coding-agent", "markdown": "https://wpnews.pro/news/how-to-set-up-an-slo-with-opentelemetry-and-your-ai-coding-agent.md", "text": "https://wpnews.pro/news/how-to-set-up-an-slo-with-opentelemetry-and-your-ai-coding-agent.txt", "jsonld": "https://wpnews.pro/news/how-to-set-up-an-slo-with-opentelemetry-and-your-ai-coding-agent.jsonld"}}