The side quest that freed 10% of our database
A single lateral-join query answering "who's on call for this rotation layer right now" consumed 34% of incident.io's Postgres replica CPU.
A single lateral-join query answering "who's on call for this rotation layer right now" consumed 34% of incident.io's Postgres replica CPU.
AI model providers can mostly be managed like any third-party dependency, with SLAs, SLOs, an LLM gateway, failover and observability, and they count toward dependency availability ceilings (three 99.99% components cap you near 99.97%).
AI features that have quietly become part of engineers' workflows need designed fallbacks for both outright model outages and silent quality regressions.
incident.io's Cursor cloud agents now QA React Native pull requests by driving an iOS simulator (EAS Simulator) or Android emulator in the cloud against a per-agent copy of the Go backend with seeded Postgres data, tunnelled back to the agent's VM, and attach claims linked to screenshots and a session recording.
Using a SAVEPOINT per tick in a Postgres-backed job queue made every locked row carry a MultiXact ID in xmax.
Building a reliable AI SRE took incident.io two years, far longer than the first promising prototype suggested, and the hard work sat in four areas around the model.
incident.io made its rate limiter keep working when its Valkey backing store (Google Cloud Memorystore) is unavailable, instead of failing open.
incident.io removed Google Cloud Pub/Sub as a single point of failure by adding NATS as a second message broker in an active-active setup behind its existing Go `eventadapter` abstraction.
incident.io built an internal "data brain" agent that answers business questions against BigQuery by encoding institutional analyst knowledge rather than relying on raw text-to-SQL.
incident.io moved nearly all Postgres read traffic to a read replica and had to preserve read-after-write consistency without hand-routing each query.
incident.io measures On-call reliability with two customer-centric SLIs, alert ingestion availability and notification delivery latency under 5 minutes, both targeted at 99.99% monthly.
A 99.99% availability target leaves only about 4 minutes 23 seconds of downtime per month, and even an idealised 3am page-wake-runbook-failover sequence exceeds it, so four nines can't depend on a human in the critical path.
incident.io's on-call schedule renderer, which computes future shifts on the fly from rotation config, working hours and fair-scheduling rules, became dramatically faster through a series of fixes culminating in a ~2,500x speedup.
incident.io runs a deliberately minimal stack on Google Cloud that lets two platform engineers support thousands of customers.
incident.io cut its typical lint-plus-compile feedback loop from over 90 seconds to under 10, arguing that fast toolchains matter even more when AI coding agents generate code faster than slow tools can validate it.
incident.io cut P95 latency of its alert-filtering API for large organisations from 5s to 0.3s by pushing JSONB attribute filters into Postgres using bloom filters.
The October 20, 2025 AWS us-east-1 outage degraded incident.io through third-party dependencies even though it runs on Google Cloud: its transcription, SAML, telecom and status page providers were all affected.
incident.io defines its HTTP API in Goa's design-first DSL, which generates net/http transport handlers, validation code, typed Go service interfaces, OpenAPI 3.0 specs and Go clients.
incident.io cut CI/CD times by moving from a hosted provider, where a cold Go build cache made compiling 15,000+ tests across 350+ packages the bottleneck, to Buildkite running on three self-hosted 48-vCPU servers.
incident.io engineers run four to seven Claude Code agents in parallel, each isolated in its own Git worktree so concurrent sessions don't clobber a shared working directory.
incident.io built Workbench, an internal AI tooling suite, instead of buying an off-the-shelf eval and observability product such as Galileo or Braintrust, to support development of its incident-investigating AI agent.
incident.io cut its incident chatbot's response latency by about 50% (saving 2-3s per interaction) by speculatively executing LLM tool calls in both directions.
Letting an LLM iteratively rewrite a prompt until evals pass produces overfitted, brittle prompts.
Six practical techniques fix prompts that resist the usual remedies.
incident.io cut latency of an LLM prompt that plans Grafana dashboards for incident investigations from 11s to under 2.3s without changing its behaviour, mainly by shrinking output tokens.
After hitting OpenAI billing limits broke its early AI features, incident.io built per-prompt cost attribution into its Go LLM abstraction, using reflection to capture each prompt's type name alongside token usage and emitting it to Grafana metrics and Postgres records for BI.
Postgres deadlocks come from transactions acquiring locks in inconsistent orders, and the main fix is to restructure transactions so they always lock resources in the same sequence.
On 28 August 2023, a valid ADEXP flight plan containing duplicate waypoint codes (DVL for Deauville and Devil's Lake) hit a rare six-condition edge case in NATS's FPRSA-R conversion system.
incident.io dogfoods its own paging product and covers the case where its alerting platform itself fails with a dead man's switch.
incident.io assigns error ownership inside its monolith by dividing the codebase into team-owned units (apps, backend feature packages, integrations), each with a required jsonnet module file declaring owner, criticality and customer-facing features.
incident.io masks sensitive data in BigQuery by default: a daily Python job applies PII and confidential policy tags to every untagged STRING/BYTES column replicated by Fivetran, so humans see only SHA256-hashed values.
incident.io structures its dbt warehouse in three layers: staging models that rename, cast and lightly combine source tables, intermediate models that handle reusable joins and expensive calculations, and marts split into internal dim/fct tables and customer-facing insights models.
Distributed tracing with OpenTelemetry lets incident.io engineers spot bugs before customers report them, by showing each request's route as a tree of timed spans that exposes slow steps, N+1 queries and duplicate calls.
Postgres indexes pay off for frequently run queries that discard most rows they read, need results in a specific order, or must enforce uniqueness.
incident.io runs data quality tests with dbt's native testing and tackled two problems: flaky relationship tests and slow debugging of failures.
incident.io structures observability for its on-call product as a consistent drill-down path.
incident.io runs an end-to-end smoke test suite for its On-call paging product every minute against production and staging, and also on every pull request and deploy using containers on a single machine.
incident.io's 2024 data stack runs Fivetran and Segment into BigQuery, dbt (run via Docker on CircleCI) for transforms, and Hightouch for reverse ETL.
A new Data Engineer's first quarter rebuilding a Fivetran, BigQuery, dbt, CircleCI and Omni data stack.
incident.io's on-call scheduler computes who is on shift from rotations with working hours, round-robin handovers and overrides, and getting it right depends on being precise about local time, offsets, IANA timezones, instants and durations.
Delivering on-call notifications via SMS and phone calls means routing through a telecom API provider and its carrier partners, where status signals are often unreliable.
incident.io built its on-call mobile app with React Native and Expo after weighing native iOS/Android, Kotlin Multiplatform and Flutter.
When a JSONB column's shape changes, a custom sql.Scanner and driver.Valuer on the Go column type can read both the old and new formats while always writing the new one. incident.io used this to move conditions from a flat array to an array of condition groups, which was needed to support OR logic.
New engineers at incident.io onboard themselves by opening a PR to the infrastructure repo that adds them as a user, puts them on a team in a Jsonnet config, and defines a Spacelift dev stack.
incident.io's Terraform integration lets users generate readable, commented Terraform config from the existing Workflows and Schedules visual builders, and the same flow handles editing and importing existing resources.
incident.io built a related-incidents feature by embedding a plain-text representation of each incident with OpenAI's text-embedding-ada-002 and ranking matches by cosine similarity.
incident.io built suggested incident summaries with OpenAI: each time a responder posts an update, GPT proposes a new summary from the update, the Slack conversation and the previous summary, and a human accepts, edits or rejects it.
incident.io sped up builds of its Go monolith by tracing the compiler with `go build -debug-trace` and viewing the output in Perfetto.
incident.io built a custom Go hot-reloader that records build telemetry (platform, memory, power source, Go build stages, triggering files) from developer MacBooks and pipes it through Fivetran into BigQuery.
incident.io cut a Go code-generation step from about 16 seconds to under half a second (97% faster) by adding commonly used imports directly to the generator's template.
Supporting rich text in incident summaries and updates means translating between Slack's new rich text input and ProseMirror in the dashboard, plus one-way exports to Jira, Confluence, Notion, Google Docs and email, each with different formatting rules.
incident.io built a Storybook-style catalogue for its 70+ Slack modals and similar number of messages by extending its Go modal registration framework so every `modal.Register` call also supplies named example variants built from test fixtures.
After migrating to Google Cloud, sporadic Postgres and memcached connection timeouts on GKE turned out to be node-wide, not process-local.
incident.io replaced its homegrown useFetchData hook with SWR (stale-while-revalidate) in its React dashboard, while keeping the type safety of its OpenAPI-generated TypeScript client.
A two-day hackathon at incident.io prototyped GPT-3.5/GPT-4 features: incident handover summaries generated from full Slack channels, a reply-with-❓ jargon explainer, and natural-language incident filters.
incident.io's Go app loads config from per-environment YAML files, overrides values with environment variables, then resolves `secret-manager:` references from Google Secret Manager at boot.
incident.io's product team populated its own Catalog with features, integrations and teams to replace messy, hand-curated incident Custom Fields.
Intermittent API timeouts at incident.io over two weeks traced back to requests blocking on Go's database/sql client-side connection pool, with no single slow query or pool to blame.
incident.io built its Status Pages product in three months on Vercel and Next.js, using Incremental Static Regeneration with per-fetch revalidate times (e.g. 30s) so the backend serves only a couple of requests per minute regardless of traffic spikes.
A Go monolith can get much of the reliability isolation of microservices by splitting workloads into separate deployments of the same binary, instead of breaking it into services.
Data model migrations can be made low-risk with a four-step playbook: create the new model, dual-write to old and new (backfilling dependent and existing data with rerunnable jobs), read from both and alert on mismatches before switching reads behind a feature flag, then stop writing to and drop the old model. incident.io walks through the pattern using its move from hard-coded string incident statuses to a per-organisation incident_statuses table.
A poison-pill Pub/Sub message crashed incident.io's Go monolith on Heroku repeatedly, causing 13 minutes of downtime over 32 minutes.
Combining Go generics with code generation gives type-safe partial structs: a generic Partial[T] tracks which fields are set alongside a subject value, enabling safe partial updates through a Gorm wrapper that avoids zero-value overwrites and race conditions.
incident.io treats developer experience as leverage for sustaining engineering pace without accruing technical or product debt.
incident.io's workflow executor listens for trigger events, evaluates workflow conditions against a scope, and creates a workflow run before executing steps.
incident.io's Workflows feature ("when X happens, if Y, do Z") is built as a small, statically typed programming language in Go.
incident.io's two-person data team reworked its BigQuery/dbt analytics stack as the company grew from 10 to 30 people.
Gorm's Callbacks API can wrap every Postgres query in an OpenCensus span that feeds Google Cloud Tracing: a before-callback starts the span only when a parent span exists, and an after-callback ends it.
A system's availability is capped by the combined availability of its critical dependencies, which per "The Calculus of Service Availability" need roughly an order of magnitude more nines than the service itself.
incident.io launched a public API focused on three use cases: creating incidents automatically from other systems, exporting incidents and their actions and follow-ups to BI tools, and configuring roles, severities and custom fields from external sources such as Terraform.
incident.io pages on every Sentry error, and cut the resulting noise with four quick changes instead of switching to error-rate alerting.
Standard Go errors carry no stacktraces, which makes Sentry nearly useless, so incident.io standardized on pkg/errors and wraps every returned error to capture a trace at the deepest frame.
incident.io added role-based access control by mapping a fixed set of customer-facing roles (owner, admin, etc.) to granular internal scopes.
A small startup data stack built in two weeks: Fivetran (plus Stitch for connectors Fivetran lacks, like the Close CRM) extracts data into BigQuery, dbt transforms it, and Metabase lets non-engineers explore it without SQL.
Go code that builds external API clients through a single constructor can be mocked by stashing a mock in context.Context: the constructor (ClientFor) returns the context-held client if present, otherwise builds a real slack.Client. incident.io generates a SlackClient interface from the concrete slack-go struct with interfacer, then a gomock mock via mockgen, both driven by go:generate directives.
incident.io keeps tenant data isolated in a single shared database and application by making its Go code safe by default rather than relying on tests alone.
incident.io cut Docker image build times from an inconsistent 3–10+ minutes back to under 2 minutes by replacing CircleCI's remote Docker and Docker Layer Caching with a permanently running GCP c2-standard-8 builder with a 500GB SSD.
A small team wired its Go app to Google Cloud Trace via the OpenCensus Stackdriver exporter, then teed zap logs to both STDERR and Cloud Logging with trace and span IDs attached, so logs appear inline with traces.
incident.io ships to production many times a day and uses feature flags to merge large features like Announcement Rules incrementally while hiding them from customers until launch.
HTTP header names arriving downcased at a public API were wrongly blamed on a Google Cloud Load Balancer change.
Postgres sequences pre-log 32 values to the WAL (SEQ_LOG_VALS), so replicas see sequence state as it would be after a primary crash.