Skip to content

Advanced Concepts · Concept lesson

Observability: Signals That Explain User Impact

Use metrics, logs, traces, and careful instrumentation to detect user harm, locate causes, and support safe operational decisions.

Written for readers who already know the basics. If the words here are new to you, read The request lifecycle and Capacity estimation first.

Original educational architecture · Version 2026-11-12.1 · Examples use stated hypothetical assumptions, not a company's actual design.

What you will be able to explain

  • Match metrics, logs, and traces to the questions each signal can answer.
  • Instrument service boundaries with low-cardinality dimensions and propagated context.
  • Build SLO alerts and debug workflows without leaking sensitive information.

Observability is the ability to ask useful questions

Monitoring tells you whether known conditions crossed a threshold; observability is about being able to investigate behavior you did not predict in advance. Neither is achieved by collecting every possible record. Start from operational questions: are users completing a journey, where is latency accumulating, which dependency is failing, and what changed? Metrics summarize populations over time, logs provide discrete contextual events, and traces connect spans across a request path. They complement one another. A dashboard full of metrics cannot show why one request hit a rare code path; a giant log archive may not reveal whether the entire service is degrading. Instrument the system so evidence can be correlated with a request or business operation without exposing user secrets.

A trace context typically includes a trace ID and span IDs propagated across service calls and message headers. The root span describes an operation; child spans record meaningful work such as database calls or queue processing. Async boundaries need context propagation too, otherwise a trace stops at the broker. A trace is not proof of causation: sampling, missing instrumentation, clock skew, retries, and asynchronous work can make the picture incomplete. Correlation IDs can connect user-visible interactions across systems but should be opaque and non-sensitive. Avoid putting email addresses, tokens, or raw user input into span attributes. Instrumentation is production code with data handling and performance costs, so its schema needs review and ownership.

Choose metrics, logs, and traces for the question

Metrics are efficient for rates, ratios, distributions, and alerts. Request counters can produce an availability ratio, histograms can represent latency distributions, and gauges can report queue depth or active connections. Labels must remain bounded: route template is usually safer than raw URL, and status class is safer than a unique error message. Logs are useful for event details, decisions, and error context, with structured fields for service, version, trace ID, and outcome. They need severity discipline, retention, access control, and redaction. A log line per heartbeat may be expensive and noisy. Traces help isolate where time is spent across a call path, but head-based sampling can miss rare failures and tail-based sampling needs buffering and capacity.

OpenTelemetry provides vendor-neutral APIs and protocols for producing telemetry, but it does not automatically make instrumentation useful or safe. Define a resource identity such as service name, deployment environment, and version; then standardize operation names and semantic attributes. Avoid high-cardinality metric labels such as user ID, request ID, or arbitrary query strings. If such values are needed for a specific investigation, consider access-controlled logs or trace attributes with sampling and redaction. Metrics should be aggregated before export when possible. A collector can batch, enrich, filter, and route data, but it becomes another operational component; size it and monitor dropped telemetry. Observability pipelines should fail in a controlled way without blocking user requests.

Calculate a denominator and find a slow dependency

Suppose an API serves 200,000 valid requests in a 30-minute window. Of these, 198,000 complete successfully within 400 ms and 1,000 succeed more slowly; 1,000 fail. If the SLI counts only successful responses under 400 ms, it is 198,000 / 200,000 = 99%. If the team mistakenly divides by all completed responses after excluding timeouts, denominator changes and the displayed number can improve during an outage. Define eligible traffic before computing the ratio. If the objective is 99.9%, 2,000 bad events in that interval represent 10 times as many as the 200-event allowance for the interval at uniform traffic. The exact alert should use the objective window and an appropriate burn-rate method, not simply page on every 30-minute percentage fluctuation.

A trace then shows a slow request: 20 ms at the edge, 35 ms in application logic, 1,200 ms waiting for inventory, and 40 ms formatting the response. The total is roughly 1,295 ms. A service-level dashboard establishes that the issue is widespread; sampled traces identify inventory as the dominant span. Logs for the affected deployment version show a connection-pool wait increase after a configuration change. Useful dimensions include region, route template, status class, and version—not customer ID. Trace sampling at 1% would retain roughly 2,000 of 200,000 traces, but may miss a rare failure; tail sampling that keeps errors and slow requests can improve diagnosis at higher collector memory and processing cost. The numbers are illustrative and should be tested against actual volume.

Signals correlate without replacing one another
1. User operation

Carries opaque trace context and business outcome.

2. Metrics

Bounded counters, histograms, and saturation signals.

3. Structured logs

Redacted event details and trace correlation.

4. Traces

Parent-child spans across service and queue boundaries.

5. Telemetry collector

Filters, batches, samples, and exports without blocking requests.

6. SLO view

Calculates good / eligible event ratios and burn.

  1. User operation → Metrics: aggregate outcome
  2. User operation → Structured logs: emit redacted event
  3. User operation → Traces: propagate context
  4. Metrics → Telemetry collector: bounded series
  5. Structured logs → Telemetry collector: structured fields
  6. Traces → Telemetry collector: sampled spans
  7. Telemetry collector → SLO view: query and alert

Instrument to answer decisions, not to maximize data

A RED view—rate, errors, duration—helps service owners understand request-oriented behavior. A USE view—utilization, saturation, errors—helps infrastructure owners examine resources. They are complementary lenses, not competing doctrines. Business-level measures such as completed reports or successful checkout may reveal failures that request metrics miss. Logs and traces provide depth when metrics identify a problem. The right signal depends on the decision: an on-call responder needs a clear symptom and likely owner, while a developer investigating a rare code path needs trace or structured event context.

Instrumentation depth should match criticality and cost. A low-volume internal tool may need a small set of service metrics, structured errors, and sampled traces. A high-throughput API with many dependencies needs standard context propagation, collector capacity, and explicit telemetry budgets. Always define what happens when the observability vendor or network is unavailable: request paths should not synchronously wait for a telemetry export. A local collector can buffer a limited amount and drop lower-priority data before consuming unbounded disk. Keep raw retention short and aggregate longer-term metrics if trends are needed. Redaction should happen before external export where possible, not only in a dashboard.

Avoid blind spots, cardinality explosions, and sensitive exports

A common metrics failure is using a unique identifier as a label. If every request ID creates a time series, storage, memory, and query costs can explode; the resulting dashboard may become unusable during a high-volume incident. Bound labels through route templates, enumerated outcomes, and controlled regions. Keep exact IDs in sampled, access-controlled traces or logs where justified. Another blind spot is instrumentation that drops errors because spans are not flushed after a crash. Monitor export queues, collector drops, sampling decisions, and data delay. Telemetry volume and coverage should themselves have service objectives or at least operational alarms.

Sensitive data can leak into exception messages, SQL statements, baggage, URLs, and span attributes. Treat traces and logs as production data with access controls, retention limits, encryption, and deletion rules. Avoid capturing request bodies by default. If a debug mode captures more detail, require time bounds, explicit authorization, and a reviewed redaction policy. Sampling can bias the evidence: ordinary head sampling may discard the very slow traces responders need. Tail sampling retains selected outcomes but adds memory pressure and may split traces if spans arrive late. Validate sampling under overload. During an incident, do not disable all filtering casually; capture only what is needed and return to normal retention.

When not to add another telemetry system

Do not deploy separate metrics, logging, tracing, profiling, and event platforms without an owner and a clear use case for each. More vendors do not necessarily improve observability; they can create fragmented identities, duplicated ingestion cost, and inconsistent retention. A simple managed telemetry backend with standard instrumentation can be enough. Do not emit a trace span around every trivial line of code; overhead and noise make important spans harder to see. Do not use logs as a substitute for reliable business event storage. Logs can be sampled, expired, or inaccessible and should not be the only record that a payment or user action occurred.

Avoid making a dashboard the source of truth for a business decision if its aggregation or sampling is poorly understood. Low-volume services may not have statistically stable percentiles; use event-level thresholds or longer windows. For user-level debugging, privacy and access policy may prohibit collecting the needed fields, and the design should respect that limitation rather than find a loophole. When telemetry cost exceeds its diagnostic value, lower sampling, reduce payload, or aggregate. Keep the ability to temporarily increase detail under controlled conditions rather than collecting sensitive data indefinitely.

Senior questions for an observability plan

Ask which user outcomes are measured, what each SLI denominator includes, and whether latency tails are represented. Can an operator distinguish request acceptance from durable completion? Do trace IDs cross queue boundaries and service versions? Which labels have bounded cardinality, and who reviews schema changes? What telemetry is sampled, dropped, or delayed during overload? How much does ingestion cost at peak, and what happens if the collector is unavailable? A mature plan names the operational question for each chart rather than listing every available signal.

Then review data handling. Can a token, email, query string, or private document body enter a log or span? What does redaction remove before external export? Who can query raw traces, for how long, and how are deletion requests treated in logs and backups? Does tail sampling have enough memory and a defined overflow policy? Can a responder identify a deployment change without relying on a unique customer label? Finally, ask the team to demonstrate an incident drill: identify a user-facing SLO symptom, find the relevant trace safely, locate the dependency, and verify recovery. Observability is successful when it changes the speed and quality of a decision.

Terms in plain language

Trace
A connected set of spans representing work across one or more services for a request or operation.
Cardinality
The number of distinct values or combinations a metric label can take.
Sampling
Selecting a subset of telemetry records to retain, often based on probability or request characteristics.

Preparing practice controls…

Check your understanding

These checks explain concepts. They do not measure architecture seniority or update readiness.

1. Which signal is usually best for showing the distribution of request latency across a population?
2. Why avoid user ID as a metric label?

Design independently

Create an observability plan for a service that accepts jobs and processes them asynchronously. Operators need to detect lost work, diagnose a slow dependency, and avoid exporting personal data.

Hints, not a solution
  • Use different signals for rates, individual context, and cross-service time.
  • Propagate trace context in message metadata.
  • Define low-cardinality labels and a privacy review.

0 / 20,000 characters · Not saved

Your learning notes

Sign in to save

Marking a lesson read and reviewing an exercise are separate actions. Neither implies mastery. Saved work is account-owned; saves are explicit and do not queue offline.

References and boundaries

Primary documentation supports the mechanisms described. It does not certify these hypothetical architectures, prices or sizing assumptions. Review platform-specific behavior before implementation.

OpenTelemetry Documentation: Concepts

Primary OpenTelemetry documentation describing telemetry signals, resources, and context concepts.

W3C Trace Context

Primary standard for trace context propagation across participating services; it does not prescribe privacy policy or SLOs.

Back to curriculum