Sre Slos And Error Budgets 标志

Sre Slos And Error Budgets

社区
paulip114
sre-slos-and-error-budgets

Use when defining, reviewing or refining SLIs and SLOs, writing or applying an error budget policy (release freezes, reliability prioritization, escalation), or quantifying incidents and projects in error-budget terms. Based on Google SRE practice.

Add to TypingMind

概览

发布者paulip114
代码仓库sre-practice-skills
技能名称sre-slos-and-error-budgets
星标数
64
复刻数
19
附带文件
3
许可协议Apache-2.0
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 3 个附带文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 paulip114 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Sre Slos And Error Budgets AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/paulip114/sre-practice-skills/tree/main/sre-slos-and-error-budgets
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/paulip114/sre-practice-skills.git /tmp/sre-practice-skills
mkdir -p .claude/skills
cp -r /tmp/sre-practice-skills/sre-slos-and-error-budgets .claude/skills/sre-slos-and-error-budgets
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Sre Slos And Error Budgets,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Sre Slos And Error Budgets。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Sre Slos And Error Budgets 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

SLOs and Error Budgets

Define what "reliable enough" means for users, then agree in advance what the organization does when the service falls short.

SLO Design

Design service level indicators (SLIs) and objectives (SLOs) that track what users experience, and that the organization will actually use to make decisions.

Core ideas

  • An SLO is a target for "reliable enough". Above it, nearly all users are satisfied; below it, they start to complain or leave.
  • 100% is never the target. Every extra nine costs more and is worth less to users, dependencies between you and the user add their own failures, and a 100% goal leaves no room for change, which is the main source of outages.
  • Express every SLI as good events / valid events, a ratio between 0% and 100%. Then error budget = 100% − SLO, and one set of tooling (numerator, denominator, threshold) works for every SLI.
  • Separate the SLI specification (what matters to the user, e.g. "home page loads in < 100 ms") from the SLI implementation (where and how it is measured). One spec can have several implementations that trade off fidelity, coverage and cost.
  • SLOs need an owner empowered to trade velocity for reliability — usually the product owner.

Procedure

  1. Scope. Pick one application. Name the users whose happiness you are optimizing.
  2. Map the system. Sketch components, request flow, data flow and critical dependencies. Classify each component as request-driven, pipeline or storage (see references/sli-menu.md).
  3. List critical user journeys (e.g. search → add to cart → checkout). These are what SLIs should ultimately represent.
  4. Choose SLI specs. At most ~5 SLI types for the service. Use multiple thresholds for latency-like SLIs so you cover both the typical case and the tail (e.g. 90% < 100 ms and 99% < 400 ms).
  5. Choose implementations. Start with the cheapest data that exists (logs or load-balancer metrics) over probers or client instrumentation that would take weeks. Prefer measuring as close to the user as is practical, and note what each source misses (e.g. server logs miss requests that never arrive).
  6. Set starter targets. If nothing better is known, measure recent performance and round down to a manageable figure (e.g. two significant figures for availability, a coarse step for latency). Don't lock yourself into today's accidental excellence, but remember users come to expect whatever you deliver.
  7. Pick a window. Default: a 4-week rolling window (whole weeks keep weekend counts constant), with weekly summaries for prioritization and quarterly reports for planning. Use calendar windows only where business planning needs them.
  8. Compute the budget in absolute terms (allowed bad events per window) so people can reason in "this outage cost 13% of our budget".
  9. Get agreement from three parties: product (target is good enough for users), development (will act when budget runs out), operations (defensible without heroics or excessive toil). If any party won't sign, iterate on the SLI/SLO — don't ship an SLO without teeth.
  10. Document it using references/slo-document-template.md, including the rationale and whether numbers are observational or ad hoc. Review monthly at first, quarterly once stable.
  11. Pair with an error budget policy (Error Budget Policy below) and burn-rate alerts (sre-monitoring-and-alerting).

Iterating on an existing SLO

Collect a cheap signal of user happiness (support tickets, manually detected outages, forum posts, surveys). Then compare it with budget burn:

  • Real user pain that never dented the budget → poor recall: tighten the SLO or move/broaden the SLI implementation.
  • Budget burn with no user pain → poor precision: loosen the SLO or fix the SLI.
  • If moving the threshold either way gives too many false positives or negatives, the implementation is the problem, not the number.
  • Need a tighter target than you can meet today? Track it as an aspirational SLO that the error budget policy explicitly does not enforce.

Use this matrix to decide what to do next:

SLOToilUsers happy?Action
MetLowYesShip faster / relax release process, or move SRE effort elsewhere
MetLowNoTighten SLO
MetHighYesReduce false-positive alerting or temporarily loosen SLO; fix product / automate mitigation
MetHighNoTighten SLO
MissedLowYesLoosen SLO
MissedLowNoMake alerting more sensitive
MissedHighYesLoosen SLO
MissedHighNoOffload toil; fix product / automate mitigation

Advanced patterns

  • Bucket requests by importance or expected responsiveness (e.g. premium vs free tier; interactive vs bulk export) and give each bucket its own SLO, rather than one SLO per endpoint.
  • Dependencies: a component on the critical path of a high-value journey needs an SLO at least as strict as that journey. Don't multiply availabilities as if redundant copies were independent — shared dependencies and control planes break that math.
  • Don't confuse SLOs with SLAs: an SLA is a contractual promise with penalties and should be looser than the internal SLO.

Output

When asked to design SLOs, produce: the component classification, a table of SLI specs → implementations (with known blind spots), proposed targets with rationale, window, budget in absolute numbers, and a filled SLO document.

Error Budget Policy

An SLO only changes behavior if the organization has agreed in advance what it will do when the budget runs low. The error budget policy is that agreement.

Core ideas

  • Error budget = 1 − SLO over the SLO window. A 99.9% SLO on 1M requests in four weeks allows ~1,000 bad requests.
  • The budget is a shared currency between product velocity and reliability. While budget remains, teams may take risk (launch, experiment). When it's gone, risk-reduction takes priority.
  • The policy must be written down and approved by product, development and SRE/operations before it is needed. Getting that sign-off is also a test of whether the SLO is right (see step 9 of SLO Design).
  • Enforcement is not punishment; it is the pre-agreed way to restore stability.
  • Budget is an approximation of user pain. One long outage, several short ones and a steady low error rate can cost the same budget but feel different to users — use judgment at the edges.

Writing a policy

Use references/policy-template.md. It must cover:

  1. Goals and non-goals — protect users from repeated misses; give permission to ship while in budget. Not a tool to punish teams or to aim for zero errors.
  2. SLO miss policy — what happens when the budget is exhausted over the window. Typical: halt all changes except urgent fixes (high-priority bugs, security) until back within SLO; reliability bugs take top priority; optionally the whole dev team works on reliability.
  3. What counts. Decide in advance, and write down:
    • Service's own bugs or procedural errors → enforce the freeze.
    • Failures of company-wide infrastructure or another team's dependency → choose between "freeze anyway" (better for users) or "don't freeze, but escalate to the dependency". Record the choice.
    • Errors that were miscategorized and later found → may retroactively trigger the policy.
  4. Outage policy (single-incident thresholds) — e.g. any single incident that consumes more than a set share of the window's budget (20% is a common starting point) requires a postmortem with at least one top-priority action item; a recurring class of outage consuming a large share over a quarter requires a planned project to fix it.
  5. Escalation path — who arbitrates if teams disagree about the calculation or about whether the action is appropriate (usually a named senior leader).
  6. Exit criteria — e.g. back within SLO over the window, plus the main contributing causes addressed.
  7. Authors, reviewers, approvers, approval and next-review dates.

Applying the policy

When budget is burning, work through:

  1. How much has been used, and by what? Rank incidents in the window by budget consumed. Example: a bad release that caused 14k errors against a 110k budget used ~13%.
  2. Is the policy triggered? Compare against the thresholds in the policy, not against how anyone feels.
  3. Who owns the cause? Apply the dependency rule written in the policy.
  4. Act — freeze, re-prioritize, schedule postmortems — and announce it to stakeholders with the numbers.
  5. Track exit criteria and lift the freeze explicitly.

Using budget for prioritization

  • Estimate expected budget cost per year of each failure class (frequency × budget per occurrence). Fix the most expensive class first. E.g. two or three bad releases per year can cost far more budget than a once-in-five-years hardware failure, so automated rollback beats a replicated database.
  • Consistently under-spending budget with low toil and happy users → relax release controls, ship faster, or move reliability effort to services that need it.
  • Aspirational SLOs can be measured alongside the real one; the policy should state they don't trigger enforcement.
  • Only experiment with deliberately degrading the service (e.g. added latency to measure user sensitivity) when there is clearly budget to spare, and be careful interpreting the results.

Sources

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Sre Slos And Error Budgets AI 技能有什么作用?

Use when defining, reviewing or refining SLIs and SLOs, writing or applying an error budget policy (release freezes, reliability prioritization, escalation), or quantifying incidents and projects in error-budget terms. Based on Google SRE practice.

为什么在 TypingMind 中使用 Sre Slos And Error Budgets?

因为您只需安装一次,就能搭配任何模型使用。Sre Slos And Error Budgets 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Sre Slos And Error Budgets?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/paulip114/sre-practice-skills/tree/main/sre-slos-and-error-budgets。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Sre Slos And Error Budgets?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Sre Slos And Error Budgets 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Sre Slos And Error Budgets 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Sre Slos And Error Budgets AI 技能免费吗?

是的。paulip114 已在 GitHub 上根据 Apache-2.0 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇