App delivery

What Are Wide Events and How Should You Model Them for Observability?

Model wide events around requests, screens or jobs. Choose useful dimensions, correlate traces and compare release-level failures without double-counting.

A wide event is a structured record that carries enough dimensions to investigate one unit of work. An agent completion event can include a service, release, route, outcome, duration, retry count and trace ID. Together those fields let you narrow a latency regression to a particular release and open the trace for an individual run. The mobile error recovery flow can supply event names for retry and resume paths so a spike in failures can be traced back to an interaction the product team recognizes.

Pick one event grain

Use a completion event for one ended request or run. Record individual spans for steps that have useful timing or parent-child relationships. Emit separate events for independently meaningful milestones such as a user approval or a durable checkpoint. Naming the grain matters because it determines what a row count means. A run with three retries can have one completion row and several tool attempt records.

Here is a synthetic completion event for a support agent.

{
  "event_name": "agent.run.completed",
  "schema_version": 1,
  "occurred_at": "2026-11-18T14:21:09Z",
  "service": "support-agent",
  "environment": "test",
  "release": "2026.11.18.2",
  "route": "refund_status",
  "run_id": "test-run-184",
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
  "outcome": "timeout",
  "duration_ms": 1370,
  "tool_attempts": 3,
  "last_tool": "order_lookup"
}

Separate the envelope from optional detail

Standardize the event name, time, version, service and correlation IDs first. Put units in field names or their producer contract. Keep outcome values small and stable so dashboards can count them consistently. Add optional fields for context tied to a particular workflow and keep their meaning predictable. For example, define whether last_tool is the final tool attempted or the last successful tool.

Width and cardinality describe different properties. Adding environment and region makes the record wider. Adding run IDs introduces many distinct values. A run ID is useful for record lookup and correlation, while a metrics label with a unique value per run can create a series per run. Plan which dimensions belong on event records and which belong in aggregate metrics.

Design from a real investigation

Start with the question, “Which release and tool contributed to the rise in timeouts?” Group completion events by release, route and last tool, then divide timeouts by all completed events in each cohort. Check the sample size before ranking cohorts. Use trace IDs from a few representative runs to inspect child spans and isolate the duration of individual retries. A query store with RawTree’s OpenTelemetry integration can retain the completion records and spans in separate tables, with the trace ID connecting the two views.

Bound the size and evolve it deliberately

Use identifiers and measured outcomes instead of putting complete tool responses, prompts or credentials into an event. Keep fields that answer recurring questions and name the owner for each event. Establish size limits, clipping behavior and a sampling contract. If errors have a different sampling rate from successful requests, use an appropriate weighting scheme or use a complete metric as the error-rate denominator.

Add optional fields in compatible releases. For a renamed or retyped field, document the new meaning and test queries across both versions. With OpenTelemetry, use the OpenTelemetry log data model for timestamps and trace context so the fields can survive transport across tools.

Decide which fields survive a release

Choose a version label that can be mapped back to the exact deployment, and keep route names stable as URLs evolve. A numeric retry field should always count the same unit. If some workers report attempts and others report retries after the first attempt, convert them before comparing a trend across releases.

Field Keep it when it answers Review when
Release Which deployment started the change? Version labels vary across workers
Outcome What happened to the whole run? Several teams define timeout differently
Trace ID Which individual execution should we open? IDs disappear at an asynchronous boundary
Last tool Which finishing step correlates with failures? Different net results use the same label

At review time, use the event to diagnose one past incident. If the root cause required logs from a different service, consider adding a correlation key. If an attribute was never used and adds considerable payload size, discuss dropping it with the queries’ owners before removing it from the producer contract.

Capture context when you know it

Some attributes are clear when a request begins. Others only become available after a retry, fallback or feature evaluation. Keep a small in-memory context during the operation, enrich it as each step returns, and emit the completion event when the result is known. An asynchronous worker should carry the identifiers needed to associate its own events with the original work. Include the operation’s environment, service, release, duration and outcome where they apply.

One example is a checkout system that tries a primary payment provider before falling back. The final outcome may be successful. The duration is still shaped by an earlier timeout, and a team trying to understand latency needs both facts. Store the final outcome in the checkout completion event and capture provider attempts separately when you need their individual durations. That layout supports a rate by final outcome without losing evidence of a provider outage.

Long-running jobs need an additional decision. A completion event cannot describe a job that never finishes. A lifecycle event or heartbeat can expose stalled work. Choose an identifier shared by the started, progress and finished records, and decide when a reader should classify an unfinished job as delayed. A trace can offer more detail, but the alert should still work when a trace was not sampled.

Handle high-cardinality fields deliberately

An identifier such as a trace ID may have almost as many distinct values as the number of requests. That is precisely what makes it useful for finding one request. A category such as environment has far fewer values and usually suits a dashboard dimension. For fleet-level charts, start with dimensions that support meaningful cohorts, then use high-cardinality IDs to drill into representative records. The same attribute can be useful in an event and too expensive as a metric label.

Document who can access each identifier. A random run ID may be safe to use within an engineering team, while a user account identifier could be sensitive or linkable. Do not embed email addresses, prompts or complete responses just to make exploration convenient. Consider using stable references to approved stores and restricting payload access to the team that owns the workflow.

Keep sizes predictable. Start with typical event sizes, examine the large outliers and measure what happens during traffic spikes. Truncate or remove fields whose detail does not affect the investigation. Use explicit signals for truncation if a retained field can be incomplete. For a representative pipeline test, include an event near the configured size limit and check how the collector and destination respond.

Protect the denominator when sampling

Suppose a system keeps every timeout and samples half of normal completions. The timeouts are useful for troubleshooting. A simple division by the total retained events will systematically overstate the rate. Use a complete counter or a dataset with known sampling rates when calculating population-level rates. Store the sampling decision or configuration version where it helps readers interpret results.

Run that check separately from the investigation drill-down. Select a cohort by release and route, compare its retained record count with a complete metric, and inspect how errors were sampled. A summary can signal where to look. The stored examples show why the issue occurred. Keep those two roles legible in dashboards so engineers know which numbers represent the full workload.

Evolve events without erasing past meaning

Version an event when a meaningful field changes. If an earlier producer reports a numeric duration in seconds while a later one reports milliseconds, normalize explicitly in the query or transformation. Test both versions across an overlapping release window. For an additive field, define how the query should handle older records where it is absent. A missing identifier, an empty value and an unknown identifier can have different meanings.

Revisit the record after a real incident. Ask which fields narrowed the problem and which questions required loading an entirely separate dataset. A useful review usually reveals one dimension to add and several to preserve. Keep the completion event small enough to emit routinely, rich enough to isolate a cohort and explicit enough that an analyst can explain what one row counts.

A simple review cadence is to revisit the event contract whenever a new producer starts emitting the same event name. Ask the new producer to supply a representative record and run the existing aggregation against it. The result should either match the old meaning or make the difference explicit. When producers report incompatible operations under the same name, use a separate event name so existing dashboards retain their original population.