Beyond the Three Pillars

Same Request, Three Views

Take one real request: POST /orders for user u_81723 in eu-west-1, build 2026.10.3. It takes 436 ms and fails with a 500 because the payment provider timed out. Here is what each signal keeps:

SignalWhat it keepsWhat it loses
Metric (see Metrics)An error counter goes up by 1: http_errors{route="/orders",region="eu-west-1"}. One 436 ms value goes into a latency histogram.Which user, which request, and why it failed. Only counts survive.
Log (see Logs)One line: ERROR order failed: PspTimeout user=u_81723Where the 436 ms went across services. It also holds only what the developer chose to print.
Trace (see Traces)The path: orders 436 ms → payments 402 ms → payment provider call (timeout).Most requests entirely. Usually only 1–10% of traces are kept.

So no single signal is the whole truth:

  • Metrics cover every request, but with no detail.
  • Logs have detail, but no view across services.
  • Traces show the path across services, but only for the requests you kept.

That is why you need all three, and why you need a way to move between them.

The Newer Signals: Other Choices of What to Keep

Every signal is a decision about which facts to keep and which to drop. The newer signals just make different decisions:

SignalKeepsLoses
Wide eventsOne full record per request, with every field.Little. The price is storage.
ProfilesWhere CPU and memory went, down to the function.Which request the work was for.
RUMWhat the user’s browser or app actually experienced.What happened on the server.
SyntheticsA scripted “did it work, how fast?” check run by a robot every minute.Real users. You get a steady baseline even at 3 a.m., but no real-world variety.

Because every view is missing something, you will keep jumping between them. Join keys make that jump possible:

  • trace_id in every log line: go from a trace to its logs, and back.
  • Exemplars: a latency histogram carries a few sample trace_ids, so a p99 spike is one click from a real slow request.
  • Shared resource labels (service.name, deployment.environment, service.version): one filter works on all signals.

Without these keys you end up lining up timestamps by eye and hoping the log you found belongs to the slow request on the dashboard.

Wide Events and Canonical Log Lines

A wide event is one structured record per request (or job, or message) per service, holding everything you know about it: IDs, parameters, timings, feature flags, build version, outcome. Fifty to several hundred fields is normal. Honeycomb popularised the idea.

A canonical log line is the log-shaped version, described by Stripe. Besides your normal logs, you emit exactly one summary line at the end of every request, so there is one place to query.

one wide event (JSON, abbreviated)

{"ts":"2026-10-24T09:14:03.221Z","service.name":"orders","service.version":"2026.10.3",
 "trace_id":"4bf92f3577b34da6a3ce929d0e0e4736","http.route":"/orders","http.response.status_code":500,
 "duration_ms":436,"user.id":"u_81723","user.tier":"enterprise","cart.items":14,
 "feature.new_pricing":true,"db.queries":7,"db.total_ms":211,"cache.hit":false,
 "payments.retries":2,"error.type":"PspTimeout","host":"orders-7c9f-xk2","region":"eu-west-1"}

Two terms you need:

  • High cardinality: a field can take a huge number of different values. region has about 5. user.id has millions.
  • High dimensionality: each record has many fields (100+), not just 3 or 4.

Wide events have both. Metrics cannot afford either. Here is why.

Why a metric can’t afford it. A metric does not store requests. It keeps one running counter for each unique combination of labels. Each combination is called a series:

2 routes × 2 regions = 4 series

http_errors{route="/orders", region="eu-west-1"}  = 12
http_errors{route="/orders", region="us-east-1"}  = 3
http_errors{route="/cart",   region="eu-west-1"}  = 0
http_errors{route="/cart",   region="us-east-1"}  = 1

Now add a user_id label. The count becomes 2 × 2 × 1,000,000 = 4 million series, and every one is stored and indexed, even for users who did nothing. Each extra label multiplies the total. This is the cardinality explosion from the Metrics part and the Cost and vendors part. So metrics must have few labels, and each label must have few values.

Why an event store can. An event store (Honeycomb, ClickHouse, Loki structured metadata) keeps no counters. It keeps the raw rows, one per request:

event store: one row per request

ts        route    region     user_id  status  duration_ms  ...100 more fields
09:14:03  /orders  eu-west-1  u_81723  500     436
09:14:04  /orders  us-east-1  u_552    200     88

Cost = number of requests × size of each row. A million distinct users add nothing extra, because each is just another value in a column. You pay for rows you stored, not for combinations that could exist.

Raw rows also let you pick the question later. “Errors in the last hour, grouped by user_id” is answered by scanning rows at query time. A metric can never answer it, because it never kept user_id.

The catch: you pay per request, so wide events are often sampled. A rare event may be missing.

Log lines (see Logs)Metrics (see Metrics)Wide event
Records per requestMany, scattered, mixed formatsNone. Only counters move.One per service, structured
Questions you can askOnly what the author printedOnly what the labels allowAny field, even after the fact
Cost grows withLines × bytesDistinct label combinationsEvents × fields (reduced by sampling)
WeaknessHard to aggregateCannot drill down to one requestVolume; sampling may drop rare rows

A wide event is basically a span without the tree. Honeycomb treats both as the same record type. Emitting one takes a few lines at the end of your request handler (or an OTel span with many attributes). It does not need a new pipeline.

Continuous Profiling

Metrics tell you the service uses 4 CPU cores. A trace tells you the payments call was slow. Neither tells you which function in your code is doing the work. A profile does.

How a profile is built

  1. Many times a second, the profiler pauses the program for an instant and writes down the stack trace: the chain of function calls running right now (main → handleOrder → parseJSON). Each snapshot is a sample.
  2. At 100 snapshots a second, 30 seconds gives about 3,000 samples.
  3. If parseJSON appears in 30% of them, it used about 30% of the CPU time.

So a profile is a list of stack traces, each with a count (its weight). It is an estimate from snapshots, not an exact measurement of every call.

Continuous profiling means doing this in production all the time, not only when someone is debugging. The cost is small (usually a few percent of CPU). Each profile is saved with a timestamp and labels (service, pod, version). Later you can ask “what was the code doing at 03:10 last Tuesday?” without reproducing the problem.

What you can profile

  • CPU: which functions are running on the processor.
  • Heap (memory in use): which line of code allocated memory that is still held. Useful for memory leaks.
  • Allocations: which code creates the most new objects. Many allocations make the garbage collector (GC) work harder.
  • Mutex / block: where code waits for a lock or channel instead of working.
  • Goroutine / thread: how many are stuck in each function. Useful when they pile up.

Key ideas

  • Sampling vs instrumenting. A sampling profiler takes a fixed number of snapshots per second (Go’s default is 100, triggered by a timer signal called SIGPROF). Its cost depends on that rate, not on program size. An instrumenting profiler times every function call. It is exact but far too slow for production.
  • pprof (the common file format). Go’s built-in profiler saves compressed pprof files (Google protobuf). Each function name is stored once and referenced by number, so files stay small. A Go service can serve a 30-second CPU profile at /debug/pprof/profile?seconds=30. Open it with go tool pprof. Most profiling tools read this format.
  • Flame graph (how you read a profile). All samples are merged into one picture. Each box is a function, with the functions it called stacked on top. Width = share of samples (wider = more time). Height = call depth only. Look for wide boxes near the top: they do the work themselves. Left-to-right order is not time. A flame graph is a total over the period, not a timeline.
  • eBPF profilers (no code changes). eBPF lets small, safe programs run inside the Linux kernel. eBPF profilers (Parca Agent, Grafana Alloy’s eBPF profiler, the OTel eBPF profiler) snapshot every process on a machine, with no app change or restart. They record raw memory addresses and convert them to function names later (symbolization). Downsides: runtime-compiled languages (Java, Node.js) and interpreted ones (Python, Ruby) are harder to read this way, and you need a recent Linux kernel.
  • Where profiles are stored. Grafana Pyroscope (which absorbed Grafana’s Phlare project) and Parca (Polar Signals). Both tag profiles with Prometheus-style labels such as service_name and pod, so you filter them like metrics. They compress very well, because one minute’s profile looks almost the same as the next.

Go: pprof via Pyroscope SDK (labels = how you find it later)

pyroscope.Start(pyroscope.Config{
    ApplicationName: "orders",
    ServerAddress:   "http://pyroscope:4040",
    Tags:            map[string]string{"region": "eu-west-1", "version": "2026.10.3"},
})

RUM and Synthetic Monitoring

Everything so far watches your servers. These two watch the experience at the edge, where the user is.

RUM — Real User Monitoring

What: a JavaScript snippet (or mobile SDK) in your app reports what real browsers measured: load times, errors, route changes.

Main numbers: Core Web Vitals, judged at the 75th percentile of real page loads:

  • LCP (largest contentful paint): ≤ 2.5 s
  • INP (interaction to next paint, replaced FID in 2024): ≤ 200 ms
  • CLS (cumulative layout shift): ≤ 0.1

Good: sees real devices and networks.
Limits: only reports when a user shows up, and brings privacy and sampling duties.
Tools: Grafana Faro, OTel browser SDK, vendors.

Synthetic monitoring

What: a probe at a known location runs a scripted request on a schedule and records success and latency.

Example: Prometheus’s blackbox_exporter probes HTTP/TCP/ICMP/DNS from outside. /probe?module=http_2xx&target=https://shop.example returns probe_success, probe_duration_seconds and probe_ssl_earliest_cert_expiry.

Good: catches outages with zero traffic (3 a.m.) and measures from outside your network.
Limits: cannot show what real users hit.

prometheus.yml: blackbox scrape (target goes in a query parameter)

- job_name: blackbox-http
  metrics_path: /probe
  params: {module: [http_2xx]}
  static_configs: [{targets: ["https://shop.example/health"]}]
  relabel_configs:
    - {source_labels: [__address__], target_label: __param_target}
    - {source_labels: [__param_target], target_label: instance}
    - {target_label: __address__, replacement: "blackbox:9115"}

Exemplars

An exemplar is a bookmark. Next to a metric data point, it stores the trace_id of one real request that contributed to it (plus a value and timestamp), beside one histogram bucket. It is the cheapest bridge from “the p99 panel spiked” to “here is one actual trace from that bucket”.

The OpenMetrics exposition format writes an exemplar after a #:

http_server_duration_seconds_bucket{le="0.5",route="/checkout"} 8213 # {trace_id="4bf92f3577b34da6a3ce929d0e0e4736"} 0.437 1729761243.221

How it works in practice

  • Prometheus reads exemplars only from the OpenMetrics (or protobuf) scrape format. It keeps them in a small in-memory circular buffer, turned on with --enable-feature=exemplar-storage. OpenMetrics limits an exemplar’s labels to 128 characters. Check your version’s flags.
  • OTel metrics SDKs attach the active span’s trace context when a measurement is recorded. The default exemplar filter is trace_based: only for sampled traces.
  • Grafana: the Prometheus data source option Exemplars maps the label trace_id to a link into the Tempo data source (see Grafana). Exemplars show as dots on the time-series panel.

Correlating Signals

Observability pays off when you can pivot: metric → trace → log → profile, without re-typing a hostname. That needs shared keys. Four mechanisms, ordered by how often they save you:

Shared resource attributesWhat: service.name, service.namespace, deployment.environment.name and k8s.pod.name are identical on every signal. Set them once in the SDK or Collector (see OpenTelemetry).
Prometheus detail: OTLP ingestion maps service.name to job (as <service.namespace>/<service.name> when a namespace exists) and service.instance.id to instance. Other resource attributes land only on the target_info series unless you opt in to promote them (see Prometheus).
trace_id in logsWhat: log appenders read the current span context and add trace_id / span_id to each line (OTel log records have these as first-class fields).
Use: Grafana’s Loki derived fields turn the value into a Tempo link.
Span metrics and service graphsWhat: metrics computed from traces: request rate, error rate and duration histogram per service and operation (traces_spanmetrics_*), plus caller→callee edge metrics (traces_service_graph_request_total).
Made by: Tempo’s metrics-generator, or the Collector’s spanmetrics and servicegraph connectors (see OTel Collector).
Caveat: they only see sampled spans, so compute them before tail sampling.
Logs-to-metricsWhat: turn log lines into a counter or histogram in flight (Loki recording rules with count_over_time, the Collector count connector, Vector log_to_metric). Use it when you cannot change the app.
Trade-off: cheap and durable, but you lose the line and keep only the labels you chose.
Correlation graph from a metric panel to an exemplar to a trace to a span, then to logs by trace id and to a profile by span or resource labels. Each of the five hops is numbered and the key that makes it work is listed beneath. A dashed note says span metrics flow the reverse way, derived from traces.
The correlation graph: five hops from a slow panel to the line of code. Read it as: every arrow works only because both ends store the same key. Break the key (rename a label, drop trace_id from log output, strip the exemplar) and that hop silently becomes a manual search.

The Invariants

  • Guarantees: A pivot works exactly when both signals carry the same key (trace_id, resource labels, time window). Wide events and profiles can answer questions you did not pre-aggregate. An exemplar gives you one real request per bucket, chosen by the instrumentation.
  • Does not guarantee: That an exemplar’s trace was kept (sampling is separate). That a profile exists for the span you are looking at (profile sampling is statistical, so a 40 ms span may have no samples). That OTel profiles is stable (it is Alpha). That a RUM or synthetic number matches server-side latency.