XenonStack Data Insights on DevOps, Cloud and Data Science

Observability-Driven Development (ODD): Guide

Written by Navdeep Singh Gill | 25 August 2024

What is observability-driven development?

Observability-driven development (ODD) is the practice of designing and writing code so that you can see how it behaves in production, and using that evidence to decide what to build, release and fix next. Instead of adding dashboards after a failure, the team decides up front which questions it must be able to answer and instruments the code to answer them.

For a CTO or platform lead, the point is simple: ODD turns production behaviour into an input to development, not an afterthought for operations. It sits alongside the wider ideas in what is observability and observability vs monitoring, and this guide focuses on the developer-side habit.

How does ODD differ from monitoring and from test-driven development?

OpenTelemetry's primer says observability lets you understand a system from the outside, without knowing its inner workings, and that it helps you ask "Why is this happening?" (OpenTelemetry observability primer). Monitoring watches for conditions you already expect. Observability helps with problems you did not anticipate, which the same primer calls "unknown unknowns".

Test-driven development (TDD) asks "does this code do what I specified?" before release. ODD asks "what is this code doing for real users now?" after release, and feeds the answer back into the next change. Charity Majors of Honeycomb has argued that developers should go beyond TDD and follow observability-driven development (see Honeycomb's summary of her article). Treat it as an addition, not a replacement: you still need unit tests and performance testing.

PracticeQuestion it answersWhen it runsWhere it falls short
Test-driven developmentDoes the code meet the specification?Before releaseCannot cover every real production condition
MonitoringIs a known condition breached?In production, against set thresholdsOnly catches what you thought to watch
Observability-driven developmentWhat is the system doing, and why?Design, release and productionNeeds instrumentation discipline and an owner

What telemetry does ODD rely on?

The OpenTelemetry documentation describes telemetry as data emitted from a system and its behaviour, delivered as traces, metrics and logs. Its signals page lists traces, metrics, logs and baggage as the currently supported signals, with profiles still under development (OpenTelemetry signals). Confirm the current status on that page before you standardise.

Metrics

Per OpenTelemetry, metrics are aggregations over a period of time of numeric data about your infrastructure or application. Use them for rates, error counts and latency distributions, and for alerting on service level objectives.

Logs

A log is a timestamped message emitted by a service or component. Logs hold the detail of a single event, so they are where you look once a metric or trace has told you where to dig. Their volume is the main cost and noise problem.

Traces

Distributed tracing lets you observe requests as they propagate through complex, distributed systems, and it is especially useful for problems that are hard to reproduce locally. A span is a single unit of work and carries a name, timing data and attributes. Traces are often the hardest signal to add to an existing system, so build them in from the start.

How do you put ODD into practice?

The sequence below works for most engineering teams. It follows the OpenTelemetry guidance that code can be instrumented either with zero-code tooling or with the official APIs and SDKs, and that both can be used together (OpenTelemetry instrumentation).

  1. Name the questions first. For each feature, write down what you need to know in production: who uses it, how long it takes, what fails and why.
  2. Start with zero-code instrumentation. The docs describe it as a good way to get started, or when you cannot change the application. It covers the edges of the application and the libraries in use.
  3. Add code-based instrumentation. Use the OpenTelemetry API and SDK to add spans and attributes around the business logic that matters, which gives richer telemetry than libraries alone.
  4. Agree naming. OpenTelemetry semantic conventions specify common names for different kinds of operations and data, so telemetry is consistent across a codebase, libraries and platforms (semantic conventions).
  5. Control volume. Decide what to sample. The sampling docs describe head sampling as making the decision as early as possible, without inspecting the whole trace (OpenTelemetry sampling).
  6. Review telemetry in the release process. Ask, before merge, whether a failure in this change could be diagnosed from existing telemetry. If not, the change is not finished.
  7. Close the loop. Use production evidence to prioritise the next feature flag, rollout or fix, and share the same data with product and operations teams.

A well-instrumented application, in OpenTelemetry's words, is one where developers do not need to add more instrumentation to troubleshoot an issue, because they already have the information they need.

Why adopt ODD, and what does it cost?

AreaWhat you gainWhat to govern
DeliveryFaster diagnosis of unexpected failures, because the evidence already existsTime to add instrumentation to each change
OwnershipDevelopers see how their code behaves for usersClear owner for telemetry quality
Security and complianceA record of what services did, which supports auditKeep personal data and secrets out of logs and span attributes
CostBetter decisions on what to keep and sampleStorage and ingest volume, retention periods, high-cardinality attributes

Build the business case from your own numbers: measure incident detection and recovery time before and after you add instrumentation, rather than relying on industry-wide claims.

When is ODD not the right first step?

  • Small, stable systems with few moving parts may be well served by simple monitoring until complexity grows.
  • Teams with no on-call ownership or release discipline should fix that first, because telemetry nobody reads adds cost only.
  • Regulated data flows need a decision on what may be captured before instrumentation is added.

How does ODD apply to AI agents and LLM applications?

Agents make ODD more useful, because their behaviour varies between runs and tests alone cannot cover it. OpenTelemetry maintains GenAI semantic conventions, and the docs now point to a separate repository for them, so check that repository for current status before relying on any attribute names. Trace each model call, tool call and decision so a reviewer can reconstruct what an agent did and why. For example, AgentEvaluation is described on its own site as a tool for testing enterprise AI agents against real workflows before and after they go live. ElixirClaw is described on its site as letting teams set rules for what agents can do and keep a log of each decision.

For wider reading, see full-stack observability, cloud native observability tools and data observability.

To map one decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.

Frequently asked questions

What is observability-driven development?

It is the practice of instrumenting code during design so that production behaviour can be understood, and using that evidence to guide later development.

Does ODD replace monitoring or TDD?

No. Monitoring still watches known conditions and tests still check specifications. ODD adds the ability to investigate problems you did not predict.

Which signals does OpenTelemetry support?

Its signals page lists traces, metrics, logs and baggage as supported, with profiles under development. Check the page for current status.

Should we use zero-code or code-based instrumentation?

The OpenTelemetry docs say you can use both together. Zero-code is a good start, and code-based instrumentation gives deeper insight into your own logic.

How do we keep telemetry cost under control?

Decide what to sample, set retention, avoid unbounded attributes, and keep sensitive data out of telemetry.