Comprehensive guide to observability documentation for production observability and monitoring systems.
Observability documentation is the living, structured record of how systems produce and expose their internal states—what signals they emit, how those signals are collected and understood, and how teams use them to debug, monitor, and improve systems. It matters most when a service fails in production and engineers must answer: *Why did this happen?* The documentation must guide them from raw metrics to root causes, from logs to traces, across services and infrastructure, all without assuming prior knowledge of the system’s architecture or instrumentation.
Observability documentation defines the boundaries of what is observable and how. It answers: *What do we measure? How is it measured? What do we expect to see?* The most common failure is a documentation set that lists metrics, logs, and traces, but fails to connect them into a coherent narrative. Each signal should be documented with its origin, purpose, aggregation, and expected values. The documentation should enable a new engineer to investigate a service’s health by following a single incident path—from an alert to a trace to a log, with no missing steps.
For example, a system may emit a service_latency_p95 metric. The documentation must specify:
http_request_duration_seconds histogram, which is recorded at the HTTP gateway using OpenTelemetry.service, method, status_code, environment.A new engineer can now examine a dashboard, identify a spike in service_latency_p95, filter by service=order-service, and drill into the method=POST /v1/orders slice to find the root cause.
Instrumentation is the foundation of observability. Documentation must describe how and where instrumentation is applied. Every service should have a conventions section that defines:
For instance, the log documentation for a Go service might require:
timestamp, level, message, trace_id, span_id, and service.request_id field from the incoming HTTP request.level field to use standard values: trace, debug, info, warn, error, critical.A trace_id must be a 16-byte UUID in lowercase hex, and span_id a 8-byte UUID. Traces are sampled using a probabilistic strategy: 10% of all requests are traced, with the trace_id propagated via HTTP headers traceparent (W3C Trace Context) and baggage.
The documentation should also include the instrumentation checklist:
http_request_duration_seconds histogram.db_query_duration_seconds metric and include a db_operation label.job_started, job_completed, and job_failed events with structured metadata.service_uptime metric, updated every 10 seconds.This checklist is not just a list—it is a reference. Engineers can verify their instrumentation by checking whether the required metrics and logs appear in the observability stack.
Dashboards are the primary interface for observability. Documentation must explain how to build, use, and maintain them. A well-documented dashboard includes:
For example, a dashboard for a payment service may have:
payment_success_rate over time, with a horizontal line at 99.5%.payment_latency_p95 and payment_latency_p99, with a tooltip that explains: *Latency is measured from request arrival to payment confirmation, including external API calls.*payment_attempts by gateway (Stripe, PayPal, Braintree), each with a label showing the total number of attempts and failure rate.The documentation should specify how to create a new dashboard:
curl -X POST https://grafana.example.com/api/dashboards/db \
-H "Authorization: Bearer $GRAFANA_API_KEY" \
-H "Content-Type: application/json" \
-d @checkout-dashboard.json
The checkout-dashboard.json file must include:
{
"dashboard": {
"title": "Checkout Pipeline Health",
"panels": [
{
"title": "Success Rate",
"type": "graph",
"datasource": "prometheus",
"targets": [
{
"expr": "rate(payment_success_rate[5m])",
"legendFormat": "Success Rate"
}
],
"yaxes": [
{ "label": "Rate per second", "min": 0, "max": 1.0 }
],
"thresholds": [
{ "value": 0.995, "color": "green" },
{ "value": 0.95, "color": "yellow" },
{ "value": 0.90, "color": "red" }
]
}
]
}
}
The documentation must also define the dashboard review checklist:
Alerts are the bridge between monitoring and incident response. Observability documentation must define how alerts are written, triggered, and maintained. Each alert should be documented with:
service_latency_p95 > 800ms for 5 minutes.*The documentation should specify how to define an alert:
# alert.yaml
name: order-service-latency-high
summary: "Order service latency exceeds threshold"
description: |
The order service processes incoming orders. When latency rises above 800ms p95, it indicates:
- Database slowdown
- Slow downstream services (e.g., inventory, shipping)
- High load at the service level
condition: |
service_latency_p95{service="order-service"} > 800
for 5m
labels:
severity: "warning"
service: "order-service"
area: "checkout"
runbook: |
1. Check the order-service dashboard for recent spikes.
2. Inspect the traces for requests with high latency.
3. Query the database for slow queries in the `order_service` table.
4. Verify upstream services (inventory, shipping) are responsive.
5. If no clear cause, increase logging verbosity to `debug`.
A key failure is the absence of a runbook—a checklist that guides engineers through the investigation. Without it, alerts are just notifications. With it, they become actionable incidents.
In distributed systems, a single request may span dozens of services. Observability documentation must describe how context is propagated and how it is used to correlate events.
The context propagation standard must define:
trace_id and span_id fields.operation_name, start_time, duration, attributes, and events.A trace should include:
span_id: 8-byte UUID in hex.trace_id: 16-byte UUID in lowercase hex.parent_span_id: optional, present when a span is a child of another.attributes: key-value pairs in JSON format.events: an array of timestamp, name, and attributes.The documentation should include a trace correlation guide:
> To correlate logs with traces: > > 1. Each service must emit logs with trace_id and span_id. > 2. The trace_id must be used to link all logs and traces across services. > 3. The span_id must be used to link logs to specific spans. > 4. A log entry with span_id a1b2c3d4 should appear within the trace that has a span with the same span_id. > 5. Tools should allow filtering logs by trace_id, and display the trace timeline with log entries as events.
When a trace fails, the documentation should guide the engineer to:
trace_id from the trace.span_id to jump to the relevant log entries.Observability documentation is not static. It must evolve with the system. The documentation should include a versioning strategy:
observability.yaml file in the project root.unit, description, and source.format, required_fields, and example.span_names, attributes, and sampled_from.# observability.yaml
metrics:
- name: service_latency_p95
unit: "milliseconds"
description: "95th percentile response time of service endpoints"
source: "OpenTelemetry, Prometheus"
labels:
- service
- method
- status_code
- environment
logs:
- name: order-service
format: "json"
required_fields:
- timestamp
- level
- message
- trace_id
- span_id
- request_id
example: |
{
"timestamp": "2023-10-05T12:34:56.789Z",
"level": "error",
"message": "Failed to create order",
"trace_id": "a1b2c3d4e5f67890",
"span_id": "c3d4e5f6",
"request_id": "req-123abc"
}
traces:
- name: create_order
span_name: "order.create"
attributes:
- request_id
- user_id
- payment_method
sampled_from: "http.request"
The documentation should also define review and update cadence:
observability.yaml is audited.Several patterns fail silently in observability documentation:
trace_id in logs: a trace spans multiple services, but only the first service includes trace_id. The rest use request_id, leading to fragmented traces.span_id propagation: a service creates a span but fails to set parent_span_id when calling a downstream service, breaking the trace hierarchy.service_latency_p95 is in seconds in one service, milliseconds in another, causing confusion when comparing across services.The documentation must also warn about common configuration errors:
db_query_duration_seconds lacks db_name and operation, making it hard to drill down.trace_id: the trace_id is placed in the HTTP header X-Trace-ID instead of traceparent, breaking integration with tracing tools.Finally, the documentation should include a troubleshooting section:
> Q: A trace shows a slow span, but no logs appear in that span. > > A: Check that the span_id in the trace matches the span_id in the logs. Verify that the logs include the span_id field and that it is in the correct format. Ensure the trace_id is also present and used to correlate logs across services.
> Q: An alert triggers, but the dashboard shows no change in the metric. > > A: Check the alert’s condition and compare it to the dashboard’s time range. Ensure the metric’s aggregation window matches the alert’s duration. Verify that the metric is updated at the expected frequency.
This documentation is not a static reference—it is a living guide that evolves with the system, ensuring that observability is not just a set of tools, but a shared understanding.
This page was rewritten on 18 October 2026. It replaced a templated version that was not specific to its own title. How these pages are written and checked. If anything here is wrong, tell us at [email protected] and we will correct it.
We use cookies for analytics (Google Analytics) and advertising (Google AdSense) to improve your experience and support free content. Privacy Policy