Urgent.News

What's breaking now, across thousands of outlets.

Tech

DORA metrics + SLOs without external infrastructure: a Cloudflare Workers approach

You do not need Prometheus, a metrics SaaS, or a dedicated observability stack to run DORA-style delivery metrics and service-level objectives. On Cloudflare Workers you already own the two things SLOs need: an execution environment and a durable store. This post shows the P31 approach: telemetry rows in D1, a cron worker that rolls them up, and a burn-rate dashboard driven by plain SQL. Every…

Delivering on DORA-style delivery metrics and service-level objectives (SLOs) does not require external infrastructure such as Prometheus or a dedicated observability stack. On Cloudflare Workers, the two essentials for SLOs are already in place: an execution environment and a durable store. This post introduces the P31 approach, which utilizes telemetry rows within D1, a cron worker for data aggregation, and a burn-rate dashboard based on plain SQL.

Every request contributes a row to the api_usage table, capturing details like method, route, status, latency, and timestamp. This straightforward data collection serves as the foundation for both availability and latency percentiles, without any additional complexity. The cost of storing this raw data is minimal.

To calculate error rates, an error budget window of 30 days and a target availability of 99.9% are used. The SQL query counts total requests, sums the number of 500 errors, and calculates the error rate. With an error budget of 43 minutes per month, the worker classifies burn rates as fast, slow, or ok. Fast burn, consuming the budget at multiple rates, triggers an immediate response. Slow burn, indicating a gradual decline, prompts a review, while ok requires no action.

The cron worker executes on the Cloudflare platform using p31-ci, enabling a seamless pipeline from api_usage rows to SQL rollup and updating the status page. No external infrastructure or third-party dependencies are necessary. The entire setup can be replicated within a day, and you can eliminate your observability vendor altogether.

The starting three SLOs are availability (99.9%), p95 latency, and p99 latency. These core metrics provide a solid foundation, with the possibility of refining them based on specific requirements.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Integration with iFood: the problem with developer homologation

O desafio Hoje eu quero falar da Temperô, um SaaS multi-tenant de gestão de restaurantes: pedidos, cozinha, caixa, comandas, várias unidades por restaurante.

  • Temperô SaaS integrates iFood marketplace, syncing orders to kitchen and delivery.
  • Used polling instead of webhook, requiring refactoring of token cache.
  • Bug in mapping code to fullCode caused switch to compare against incorrect field.

Stock UI in MacOS 27 Eschews Clarity

“Thibault”, in post on Mastodon responding to Brent Simmons’s “stock Mac UI” post that I just linked to : It reminded me of my own explorations with the macOS design language, especially the modern…

More from Friday 25 September →