Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

incident.io 6 min read Case study mediumAdept

Now you see me, now you don't: feature-flagging with LaunchDarkly at incident.io

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. The team chose LaunchDarkly over building its own system because feature flagging isn't a differentiator, and integrated it across backend and frontend in a day. On the backend, the Go SDK is wrapped in a featureflags package that centralizes flag names as constants, initializes a singleton client, returns clients scoped to user and organization IDs, and supports injecting mocks so tests cover both flag states. On the frontend, the React SDK hook gates UI, and flags are mostly targeted per organization to run beta tests.

Related posts

  • Roll it out, roll it back, never redeploy

    Railway mediumAdept

    Railway now offers feature flags across its dashboard, CLI, TypeScript SDK and MCP server, so code can ship dark behind a default-off flag and be rolled out to a team, a percentage of users, or targeted segments without redeploying. Percentage rollouts use a stable bucket(key) hash, so raising a threshold never flips users back. Reads evaluate in memory against rulesets fetched at init and refreshed in the background, which makes them cheap enough for hot paths. Instead of rule priorities, conflicting or unmatched rules resolve to the flag's default, and an evaluate API returns a reason and per-rule trace for debugging.

  • How we ship code faster and safer with feature flags

    GitHub Engineering mediumAdept

    GitHub puts risky changes and in-progress features behind feature flags so it can deploy continuously and disable problems in seconds instead of rolling back a deployment over several minutes. Flags can target individual actors (users, orgs, repos, GitHub Apps or custom actor types), all staff, beta groups, a sticky percentage of actors, or a per-request percentage ("dark shipping") for invisible changes such as query optimizations. CI runs two builds, one with all flags on and one with all flags off, to cover both code paths. The costs are runtime lookups (metadata in MySQL cached in memcached, with per-actor MySQL queries for large flags) and dead-code debt, which GitHub is automating away with a git grep and rubocop-ast script that rewrites conditionals and tests and opens a pull request routed to CODEOWNERS.

  • Implementing Feature Flags from Scratch

    Railway mediumAdept

    Feature flags can be built in-house on a Next.js Twitter clone, using Postgres for app data and Redis for flag state, then deployed to Railway. Three flag types are covered: a random 30% user sample for gradual rollout, stored as a Redis Set and checked with SISMEMBER; manual on/off toggles for things like limited-time drops; and targeting based on user metadata such as IP-derived country. The case for building rather than buying is control, lower latency from keeping the flag store on the same network as the app, and a better grasp of the mechanics before choosing a vendor like LaunchDarkly.

  • Rolling out Roles

    incident.io mediumAdept

    incident.io added role-based access control by mapping a fixed set of customer-facing roles (owner, admin, etc.) to granular internal scopes. A variadic getIdentity(ctx, requiredScopes...) check in Go puts each API's permission behind a one-line change, and generated type-safe scope enums let the TypeScript frontend gate UI such as a GatedButton. Rollout used a per-organization enforcement timestamp with a March 1st deadline and owner opt-in. Initial owners were the original installers and admins were inferred from past product usage, with owners prompted to review both.

  • Organizing ownership: How we assign errors in our monolith

    incident.io mediumAdept

    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. A CI check enforces that every package has an owner, and a script rolls these up into a CODEOWNERS file. Error-wrapping middleware in Go recursively unwraps errors, maps stack-frame source paths against CODEOWNERS to find the deepest owning team, and tags the error with a team field that monitoring and alerting tools use for routing. A manual override is supported, and errors with no identifiable owner stay untagged and fall back to the on-call team.

The quest for software engineering knowledge.

Look:
Layout: