Observability
Design systems that can be understood from the outside: the difference between monitoring and observability, the pillars and how they connect, instrumentation strategy, correlation, data quality, privacy, cost, and an observability plan driven by SLOs.
Introduction
At 14:05 a pilot customer writes: “my import has been stuck for an hour.” The dashboard is green. The API’s error rate is normal. Where do you look? If the answer depends on logging into servers and guessing, the system is monitored but not observable.
Observability is the ability to understand what a system is doing from the data it emits, including answering questions you did not anticipate. This lesson explains the concept, how to design for it, and how to plan instrumentation from the objectives you set in the last lesson.
Learning Objectives
- Distinguish monitoring from observability.
- Describe the main kinds of telemetry and how they complement each other.
- Plan instrumentation from SLOs and critical journeys.
- Use correlation identifiers and context to connect telemetry across services.
- Protect sensitive data and control the cost of telemetry.
- Create an observability plan and identify gaps.
- Use AI to review instrumentation and explore telemetry safely.
1. Monitoring and Observability
Monitoring watches for known problems: a metric crosses a threshold, a health check fails. It answers questions you thought of in advance: “Is CPU high? Is the service up?”
Observability is the property of a system that lets you investigate unknown problems: “Why are imports from this one customer slow, only for files with many columns, only since Tuesday’s release?” You could not have written an alert for that, but with rich, well-connected data you can find the answer by exploring.
You need both: monitoring tells you that something is wrong; observability helps you work out what and why. An observable system is built that way, with telemetry designed as part of the product, not added after the first incident.
2. The Kinds of Telemetry
| Signal | What it is | Best for | Weakness |
|---|---|---|---|
| Metrics | Numeric measurements aggregated over time | Trends, alerting, SLOs, capacity; cheap and fast | Lose detail; cannot answer questions about individual requests |
| Logs | Timestamped records of events | Detail about what happened, errors, audit | Voluminous; hard to search without structure |
| Traces | The path of one request across services, with timing | Finding where time or errors arise in a distributed flow | Needs instrumentation and sampling; storage cost |
| Events and profiles | Business events; continuous resource profiles | Product and performance analysis; finding hot code | Specialized tooling |
| Synthetic checks | Scripted user journeys run from outside | Seeing the service as the user does, even with no traffic | Cover only what is scripted |
| Real user monitoring | Measurements from actual browsers or clients | True user experience, front-end errors | Privacy considerations |
They work best together. A typical investigation: an alert on a metric shows the import SLO burning; a trace shows the slow step is the call to the model provider; logs from that step reveal rate-limit responses for one account; a dashboard confirms the trend began after a configuration change. The next lesson covers each signal in detail.
3. Start From the Questions, Not the Tools
Do not begin with “what can we collect?” Begin with:
- Which SLOs must we compute? Each needs data: counts of good and valid events.
- Which critical journeys must we trace from the browser to the database and provider?
- What will responders need to ask during an incident? (Which tenant? Which version? Which job? Which dependency?)
- What will the business ask? (Usage, adoption, cost per summary.)
- What will security ask? (Who accessed what? Which logins failed?)
From these, derive the telemetry. For SignalDesk, for the import journey you need, at least: upload accepted, job queued, job started, each processing stage with duration, provider call latency and outcome, job completed or failed with reason, and time from upload to completion. If you can compute those for every job and slice them by tenant and version, you can answer most operational questions.
4. Correlation and Context
Telemetry becomes powerful when pieces can be joined. Build in:
- Trace and correlation identifiers: a request gets an ID at the edge, and every service, log line, and queue message carries it forward. For asynchronous work, the job’s message carries the originating trace context so the worker’s logs connect to the upload request.
- Consistent resource attributes: service name, version, environment, instance, and deployment identifier on every signal. “Errors started when version 0.1.3 reached 50 percent” is a one-query question when version is a field.
- Business context: tenant identifier (as an opaque ID, not a name), job ID, import type, feature flag state. These let you answer “who is affected?”
- Consistent naming and units across services. Agree on conventions, and document them; inconsistent names make joins impossible.
Use open standards for instrumentation, such as OpenTelemetry, so that you are not locked to one vendor and so that libraries, frameworks, and services emit compatible data. The concepts in this course apply to any standard-compliant tooling.
5. Instrumentation Strategy
- Automatic first. Frameworks and libraries instrument common operations (HTTP, database, queue clients) with little effort, giving broad coverage quickly.
- Add manual instrumentation for the business logic that matters: the stages of an import, the call to the provider, the outcome of a summary, the reason a job failed.
- Instrument boundaries: every call that crosses a service, a queue, a database, or a third party. That is where time and errors hide.
- Record outcomes and reasons, not just that something failed: an error category (validation, provider rate limit, timeout, internal) lets you split problems that look the same.
- Make health checks meaningful: distinguish liveness (the process is running) from readiness (it can serve) and from deep dependency checks (which should not cause cascading failures).
- Test your telemetry. A code path that fails in a way no telemetry shows is a hole. Include a check in your tests or release verification that key events and metrics are emitted.
- Version the telemetry, since dashboards and alerts depend on names. Changing a metric name silently breaks them.
6. Data Protection in Telemetry
Logs and traces are among the largest hidden stores of sensitive data. Build protection in from the start, continuing the security course:
- Never log secrets, tokens, passwords, or full request bodies by default.
- Do not log customer content (feedback text, file contents). Log identifiers, sizes, and counts instead.
- Treat personal data carefully: use opaque IDs, hash or omit emails and names, and mask in the pipeline where needed.
- Redact at the source, with libraries and filters, and again at the collector as a safety net.
- Control access: not everyone should read all logs; separate security and audit logs with stricter access and longer retention.
- Define retention: keep detailed data briefly, aggregated data longer, and audit data as required. Retention follows data protection commitments and deletion requests.
- Review prompts and model payloads before they are logged; they contain the content you promised to protect.
Test redaction as you test any control: send data with known fake secrets and personal values through the system and search the telemetry for them.
7. Cost, Volume, and Cardinality
Telemetry costs money and can hurt performance. Common causes of runaway cost:
- High-cardinality labels on metrics: a label with unbounded values (user ID, request ID, full URL path with identifiers) creates a huge number of time series. Put such detail in logs and traces, not metric labels. Use bounded labels such as route template, status class, and tenant tier.
- Verbose logging in production, especially at debug level or inside loops.
- Tracing everything: sample traces. Keep all traces with errors or unusually high latency, and a small percentage of the rest. Decide the sampling approach deliberately.
- Long retention at full resolution: downsample older data.
- Duplicate collection: the same data sent to several tools.
Set a telemetry budget and monitor the volume per service like any other cost. Telemetry that nobody uses is waste; review periodically which dashboards and queries are used.
8. The Observability Plan
Produce a short plan that maps goals to data:
| Need | Signal | Where it comes from | Status |
|---|---|---|---|
| Import success and completion time SLI | Metric (counts and histogram) | Worker stage and job events | To build |
| Where time is spent in an import | Trace | Upload through provider call | To build |
| Why a job failed | Log with error category | Worker | Exists, unstructured |
| Provider health and cost | Metric and log metadata | Provider client | To build |
| Which tenants are affected | Attribute on all signals | All services | Partly |
| User-visible latency | Real user monitoring and synthetic check | Browser, scheduled probe | To build |
| Security events | Audit log | API | Exists |
| Release correlation | Version and deployment ID attribute | Pipeline, all services | To build |
Rank gaps by risk, so the first sprint of instrumentation covers the SLO inputs and the critical journey traces.
9. Using AI With Observability
AI can review your plan, find gaps, and, on mature telemetry, help explore. Use it with care.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Act as a site reliability engineer reviewing an observability plan.
Inputs:
- SLOs and the SLIs they need: [paste]
- Architecture, critical journeys, and dependencies: [paste]
- Current instrumentation: logs format, metrics list, tracing status
(redacted examples): [paste]
- The questions responders and the business need to answer: [paste]
- Data protection rules for telemetry: [paste]
Tasks:
1. For each SLI, state whether the necessary data exists, and what
is missing.
2. Walk through three plausible failures (provider slowdown, stuck
queue, a bad release) and list what a responder could and could
not learn from the current telemetry.
3. Identify missing correlation identifiers and attributes.
4. Identify sensitive data likely to appear in the current logs and
traces, and where.
5. Identify metrics or logs likely to cause cardinality or volume
problems.
6. Propose a prioritized instrumentation backlog.
Do not assume telemetry that is not described. Mark assumptions.
For exploring real data with AI (for example, summarizing a set of log lines), redact first and use approved tools. Treat what AI says about your telemetry as a pointer to where to look, not as a measurement. It cannot see what was never emitted, and fluent prose can disguise a gap.
10. Practical Exercise
For SignalDesk (or your project):
- List the data needed to compute each SLO, and check which exists today.
- Write the telemetry fields every signal must carry (service, version, environment, trace ID, tenant ID, and so on).
- Instrument the import journey so that you can see each stage, its duration, and its outcome, from upload to completion, as a trace and as metrics.
- Write the error categories for failures, and ensure they appear in logs and metrics.
- Review the logs for sensitive data, add redaction, and test it with fake sensitive values.
- Check metrics for high-cardinality labels, and set a sampling approach for traces.
- Run the AI review prompt, verify its claims against the actual telemetry, and update the plan.
- Write the observability plan table with owners and priorities, and set a telemetry volume budget.
Verification
You are ready to continue when:
- Every SLI has data behind it, or an instrumentation task with an owner.
- A responder can follow one import from upload to completion by a single identifier.
- Telemetry carries version, environment, and tenant context.
- Tests show that secrets and customer content do not appear in logs or traces.
- Cardinality, sampling, and volume are controlled and budgeted.
- The plan states what you still cannot see.
Key Takeaways
- Monitoring tells you that something is wrong; observability helps you find out why.
- Plan telemetry backwards from SLOs, journeys, and the questions responders will ask.
- Correlation identifiers and consistent context turn separate signals into one story.
- Protect sensitive data and control cost and cardinality from the start.
- AI can critique a plan and summarize data, but it cannot see what you do not emit.
What’s Next?
With the strategy in place, we look at each signal in practice. The next lesson covers logs, metrics, and traces: how to structure them, what to record, and how to use them together.