Observability for trading systems: what to measure and alert

Server racks used to run trading systems monitored by observability tools
Photo by panumas nikhomkhai on Pexels

1 TB of logs a day can cost $6,000 to $24,000 a month to ingest at typical market rates of $0.20 to $0.80 per GB, before retention and query charges. If those logs do not identify which order path failed, the broker pays for volume without buying faster diagnosis. Observability needs a defined purpose: show where an order, market-data update or risk decision is delayed, rejected or lost.

For trading operations, the practical unit is not the server. It is the transaction across components, from client gateway to risk checks, order management system, bridge or FIX session, venue and acknowledgement. Logs, metrics and traces should let an engineer follow that path while keeping sensitive data and high-cardinality fields out of expensive storage.

Set a signal budget before collecting data

Start with the decisions telemetry must support. During a venue incident, an operator needs to distinguish a slow market-data feed from a blocked risk service or a sequence-number gap on a FIX session.

For a disputed execution, the control team needs the event timeline and a reliable correlation key. Those are different retention and access requirements.

Set a budget by signal type and define which environment it covers. The figures below are typical market ranges for a small to mid-sized broker or prop firm, in US dollars.

Costs vary with provider, region, compression, retention, query volume and bundled pricing. They are planning ranges, not audited costs for any named firm.

SignalTypical workloadTypical retentionIndicative monthly cost
Logs100 to 500 GB ingested per day7 to 30 days hot, longer in archive$2,000 to $15,000
Metrics10,000 to 50,000 active series15 to 30 days at full resolution$500 to $4,000
Traces10 to 100 GB per day after sampling3 to 14 days searchable$300 to $4,000
Synthetic checks and egressSeveral regions and critical endpoints30 to 90 days of results$200 to $2,000

The totals are not additive in every contract. Some vendors bundle metrics with log ingestion, while others bill separately for retained data, high-cardinality series or query compute.

Ask for the cost of ingest, storage, retrieval and export separately. A useful planning model is daily volume multiplied by ingest price, plus retained volume multiplied by storage price, plus query and egress charges.

Keep a fast, searchable window for live investigation and move older material to lower-cost storage where policy permits. Execution records may have regulatory or dispute-handling retention requirements that exceed operational log retention. Treat those records as a separate system of record, not as a reason to retain every debug message at full resolution.

Log the order lifecycle, not every internal detail

Use structured events with a stable schema. A lifecycle record should include an event name, UTC timestamp, service and environment, deployment version, correlation ID, and a carefully chosen order or session reference. Include status, reject category, venue or route, and elapsed time at meaningful boundaries. Keep clock synchronisation healthy across hosts, and record both wall-clock time and a monotonic duration for local intervals. Wall clocks help reconstruct a cross-service timeline; monotonic clocks avoid duration errors when a clock steps.

At minimum, capture the transitions that establish what happened to an order:

  • Client request received, with the request type and validation outcome.
  • Risk check started and completed, including the decision category and duration.
  • Order routed, with destination, session and any retry or fallback decision.
  • Venue acknowledgement, execution, cancel or reject, with the external reference where permitted.
  • Client notification sent, including delivery outcome and elapsed time.

Do not put passwords, authentication tokens, full payment details or unnecessary personal data in logs. Avoid logging the complete order payload by default.

Redact at the producer, not only in the observability platform, because data can leak through debug output, exports or a second sink. Apply role-based access and audit access to execution and account-level records.

Use correlation IDs to connect events, but do not use order IDs, account IDs, symbols or client IDs as metric labels. Each unique label combination can create another time series.

Put those fields in sampled traces or access-controlled logs instead. A few thousand active series can become hundreds of thousands when account and instrument dimensions multiply across services.

Trace the critical path from ingress through risk, routing and acknowledgement. Sampling every successful order is usually wasteful at high volume. Keep all errors and slow traces, then sample a small share of ordinary traffic, often 1 to 5 per cent as a starting point.

Verify that the sampling method preserves related spans together. Head-based sampling can discard a trace before it is known to be slow; tail-based sampling retains more useful slow paths but needs buffering and additional compute.

Keep the full event trail for failures. Sample routine success, and make the sampling decision visible.

Event volume and trace sampling should be reviewed after releases and traffic changes. A release that adds one debug line to every market-data update can multiply ingestion quickly. Teams covering platform design and operations can also use Trading Technology infrastructure coverage as a source of context for vendor and architecture decisions.

Alert on impact and degradation, not noise

An alert should name an observable failure, its scope and the action an on-call engineer can take. "CPU high" is rarely enough on its own. A rising order-acknowledgement latency combined with a growing outbound queue points to a different fault from high CPU with stable queue age and normal venue responses.

Build alerts around service-level objectives for the trading path. Typical starting measures include order acceptance and acknowledgement latency, reject rate by reason, market-data age, queue depth, risk-service availability, and FIX session state.

Set thresholds from each platform's baseline and trading hours, not from a generic rule copied across all services. A latency objective might use a percentile such as p99 over a five-minute window, with a separate longer window to avoid paging on a brief burst.

Alert on a condition that can change the operational response. Examples include:

  • Market-data age above the instrument or feed-specific limit, with affected symbols or feed groups.
  • FIX sequence gaps, repeated logons, session resets or a growing queue of unacknowledged messages.
  • Order reject rate above its normal range, split by reject category and venue so a client input issue is not mistaken for an exchange fault.
  • Risk checks timing out or breaching the latency objective, especially when bypass or fail-closed behaviour changes order handling.
  • Durable queue age increasing, even when the service is still reporting healthy.

Use warning and paging thresholds where the response differs. A warning can prompt an investigation during staffed hours; a page should mean that a defined operational action is needed now. Group related alerts into one incident, suppress repeats while the condition remains open, and attach the relevant dashboard, runbook and recent deployment information. Alert delivery itself needs a test, including the fallback route if the primary paging service fails.

For a new page, the response sequence should be short and repeatable:

  1. Confirm the scope: accounts, instruments, venue sessions and regions affected.
  2. Check whether orders are delayed, rejected, duplicated or exposed to stale prices.
  3. Compare the event timeline with recent deployments, configuration changes and upstream status.
  4. Apply the approved containment action, then record the timeline and follow-up owner.

Control retention, sampling and cardinality

Cost usually grows through three routes: more bytes ingested, longer hot retention and higher-cardinality data. Measure all three. Track daily ingest by service and index, retained storage by age, and the largest metric label sets. Set alerts on budget burn and volume growth, not only on a monthly invoice. A 30 per cent daily increase in a single service can be easier to explain and reverse before it runs for a month.

Use different retention tiers. Keep detailed operational logs and traces searchable for the period when on-call teams investigate incidents, often 7 to 30 days. Retain aggregated service metrics longer if they support capacity planning. Archive required event records separately under the firm's compliance policy. Avoid keeping debug-level logs on production indefinitely; enable them temporarily for a specific service, with an expiry and a volume cap.

Sampling should preserve evidence, not hide a fault. Keep error, timeout and slow-path traces at a higher rate, and sample healthy traffic consistently.

When a service is degraded, consider temporarily increasing the sample rate for that service rather than enabling verbose logs across the estate. Record the sample rate in the trace or event metadata so responders know what the dataset can and cannot prove.

Dashboards should answer a question quickly. Show order-path latency by stage, queue age, rejects by category, feed freshness and session state. Provide a deployment marker and a way to filter by venue or region. Avoid dashboards with hundreds of unlabelled panels; an operator under time pressure needs a short path from alert to cause. For further platform and operational reporting, see Trading Technology's coverage of trading infrastructure.

Make observability part of release operations

Every service that handles an order or market-data message should have an owner, a runbook and a small set of agreed signals. Review its event schema when interfaces change.

Test alerts in staging, then verify production thresholds against real traffic patterns, including market open, news spikes, rollovers and planned venue maintenance. A quiet overnight baseline is a poor reference for the first minutes of a busy session.

Include telemetry in capacity tests and release checks. Measure the cost and latency of instrumentation itself: synchronous logging can block a hot path, and large trace payloads can add network and storage load.

Use asynchronous buffers with bounded queues, define what gets dropped when a sink is unavailable, and expose dropped-event counters. A telemetry outage must not take down order handling.

Assign an owner to review noisy pages, missing fields and cost growth at a regular operations meeting. Close the loop after incidents by adding the signal that would have shortened diagnosis, rather than enabling broad debug logging permanently. Stop doing the following:

  • Stop logging full order payloads or credentials by default.
  • Stop adding account, order or symbol IDs as metric labels.
  • Stop paging on a threshold without a defined action or owner.
  • Stop retaining debug logs indefinitely or sampling without documenting the rate.

Frequently Asked Questions

What should a trading system log?

Log structured lifecycle events at client ingress, risk checks, routing, venue response and client notification. Include timestamps, service version, correlation ID, outcome and elapsed time, but exclude credentials and unnecessary personal or order data.

What should brokers alert on?

Alert on conditions that affect order handling or market-data quality, such as stale feeds, rising acknowledgement latency, FIX sequence gaps, growing queue age, risk-service timeouts and abnormal reject rates. Set thresholds against platform baselines and trading hours, and make the response clear.

How much does observability for trading systems cost?

Typical market ranges for a small to mid-sized broker or prop firm can run from several thousand to tens of thousands of US dollars a month, depending on ingest, retention, cardinality, queries and provider pricing. A useful estimate separates logs, metrics, traces, storage and egress rather than relying on a single per-host figure.