The three pillars: metrics, logs and traces
What each signal is good at, what it costs, and how they work together to answer questions about production.
14 min readMonitoring versus observability
Monitoring answers questions you predicted in advance: is the error rate above 1%? Observability is the ability to answer questions you did not predict, such as why only Android users in one region see slow checkouts since Tuesday's deploy. You get there by emitting rich telemetry and keeping it queryable. At organisation scale this is a platform decision, not a per-team hobby: if every team invents its own log format and metric names, nobody can debug a request that crosses five teams. A shared telemetry standard, such as OpenTelemetry for instrumentation and a common set of resource attributes (service, version, region, tenant), is one of the highest-leverage choices an architecture lead makes.
Metrics: cheap, aggregated, fast
A metric is a number sampled over time with a small set of labels, for example http_requests_total{service, route, status}. Because values are pre-aggregated, storage cost depends on the number of unique label combinations (cardinality), not on traffic. A service doing 10 000 requests per second costs the same to count as one doing 10. That makes metrics ideal for dashboards and alerts, and terrible for per-request detail. They are also fast to query: a year of one series at 15-second resolution is about two million points, which a time-series database compresses to a few megabytes and scans in milliseconds.
- Counters only go up (requests, errors); gauges go up and down (queue depth, memory)
- Histograms bucket values so you can compute p50, p95 and p99 latency later
- Never put user IDs, request IDs or raw URLs in labels: one high-cardinality label can create millions of series
Logs and traces: detail at a price
Logs are timestamped events, ideally structured JSON with consistent fields. They carry the detail metrics drop: the exact error message, the input that failed, the tenant affected. Their cost scales with traffic, so a chatty service logging 2 KB per request at 5 000 RPS produces about 860 GB per day. Traces record the path of one request across services as a tree of spans with timings, which is how you find the one slow dependency among twelve. Traces also scale with traffic, which is why they are almost always sampled.
Joining the signals
The pillars are most useful when you can jump between them. A typical investigation starts with a metric alert, narrows to a time window and route on a dashboard, opens an example trace (an exemplar) for a slow request, and reads the logs for the failing span. That only works if every log line and span carries the same trace ID and the same service and version attributes. In SystCode, adding a monitoring component to your canvas represents this telemetry path; the Feedback panel treats a design without one as blind in production.
Key takeaways
- Metrics cost scales with cardinality, logs and traces cost scales with traffic
- Use metrics to detect, traces to locate and logs to explain
- A shared telemetry standard and a propagated trace ID are what make cross-team debugging possible
Sign in to track lessons and earn badges.