Start with decisions, not data types
At 02:13, a payment API began timing out in Johannesburg. The first alert blamed database latency. The second blamed packet loss. Both were technically correct, but neither showed that a scheduled backup had saturated the private link between…
Enterprise Telemetry Optimisation Strategies for Leaner, Faster Observability
At 02:13, a payment API began timing out in Johannesburg. The first alert blamed database latency. The second blamed packet loss. Both were technically correct, but neither showed that a scheduled backup had saturated the private link between an on-premises data centre and a cloud region in eu-west. Engineers eventually found the answer in a trace, but only after searching millions of log lines and several nearly identical Prometheus series.
This is the practical problem behind Enterprise Telemetry Optimisation Strategies: collecting more data does not automatically create better visibility. In a hybrid South African estate, telemetry must be useful during an incident, affordable in ZAR, safe under POPIA, and resilient when power or connectivity is unreliable.
Start with decisions, not data types
Telemetry optimisation should begin with the operational decisions engineers need to make. “Collect everything” is not a strategy; it is an indexing bill waiting to happen.
- For availability, retain low-cardinality metrics and calculate service-level indicators close to the source.
- For latency investigations, sample distributed traces intelligently rather than storing every successful request.
- For application failures, keep structured error logs with request and trace identifiers.
- For capacity planning, retain aggregated metrics for longer than high-volume event data.
- For security and audit requirements, define a separate retention and access policy rather than mixing sensitive records with troubleshooting logs.
Grafana provides the useful operating surface here: dashboards can combine Prometheus or Mimir metrics, Loki logs and Tempo traces, while links between signals reduce the time spent switching tools. The design target should be a short path from an SLO breach to the smallest set of evidence needed to explain it.
Reduce Prometheus cardinality before it reaches Mimir
Metrics are often the cheapest telemetry signal to query and the easiest to damage. A Kubernetes cluster can produce an expensive number of time series when labels include pod names, container IDs, full URLs, customer references or dynamically generated exception text.
Keep labels bounded and operationally meaningful. Prefer route="/payments/{id}" over the raw request path, and use status_class="5xx" when an exact status code is not needed for the decision. Inspect the highest-cardinality metrics regularly and enforce naming and label rules in instrumentation reviews.
topk(20, count by (__name__) ({__name__=~".+"}))
The query is intentionally simple: it reveals which metric names create the most series. In larger environments, repeat the analysis by namespace, team and environment. Mimir is well suited to horizontally scalable, long-term Prometheus storage, but scalable storage does not make uncontrolled cardinality free.
Use recording rules for expensive, frequently repeated queries such as request error rates and burn rates. Store the result at a deliberate interval, then point dashboards and alerts at the recorded series. This reduces repeated computation during an incident and makes alert behaviour more predictable.
Sample traces according to value, not convenience
Tracing every request is attractive during a proof of concept and painful when production traffic grows. A better policy keeps all errors, slow requests and selected business-critical flows, while sampling routine successful traffic at a lower rate.
- Always retain traces containing server errors, payment failures and authentication failures.
- Retain slow traces above a service-specific threshold, such as 750 milliseconds for an interactive API.
- Use a consistent trace ID across services so a sampled parent does not hide an important downstream failure.
- Increase sampling temporarily during a controlled incident, then restore the normal policy.
- Remove sensitive attributes before export, including identity numbers, access tokens and free-form customer input.
Tempo supports high-volume distributed tracing and can connect traces with logs and metrics, making it practical to keep trace payloads focused while preserving investigative value.[3] OpenTelemetry is increasingly useful as the instrumentation boundary: recent industry reporting shows growing adoption of both OpenTelemetry and Prometheus, alongside increased interest in profiling.[1][4]
In a Cape Town service calling a dependency in eu-west, trace spans should record region, availability zone or POP, network protocol and dependency name. Do not attach raw IP addresses or customer identifiers by default. Those attributes rarely improve diagnosis enough to justify their privacy and cardinality costs.
Make Loki logs cheaper without making them useless
Loki works best when labels identify a small set of stable dimensions, such as cluster, namespace, app and environment. Request IDs, user IDs and order numbers belong in the structured log body, not in Loki labels. Turning each unique identifier into a label creates a stream explosion and undermines query performance.
{app="checkout", environment="production"}
| json
| status >= 500
| line_format "{{.timestamp}} {{.trace_id}} {{.message}}"
Emit JSON at the application boundary and redact before the log leaves the workload. A collector such as Grafana Alloy can route, drop and transform records centrally, which is preferable to relying on every development team to implement retention and redaction identically.
Use different retention classes. Debug logs may be retained for days, operational errors for longer, and regulated audit records in a controlled archive with restricted access. POPIA considerations should influence the pipeline design from the beginning: telemetry is not exempt simply because it was generated by software.
Design for load-shedding and broken links
Telemetry pipelines must remain useful when the infrastructure is least healthy. During load-shedding, a site may lose power briefly, restart collectors and reconnect through a constrained link. During a fibre fault, a branch may reach neither the central Loki endpoint nor the cloud metrics gateway.
- Buffer telemetry locally with bounded queues so a temporary outage does not block application traffic.
- Drop low-value debug events before dropping errors, SLO metrics or security records.
- Use backoff and jitter to prevent every collector reconnecting simultaneously.
- Alert on telemetry freshness, not only on application health.
- Keep a local operational dashboard for critical services when the WAN path is unavailable.
Alert rules also need load-shedding awareness. A complete site outage should not generate thousands of downstream alerts. Alert on the service-level symptom, group related notifications, and use inhibition rules for known parent failures. A missing-data alert should distinguish “the service is down” from “the collector cannot reach the backend”.
Control cost with an evidence budget
Telemetry cost is a design constraint, particularly when cloud storage and egress are priced in foreign currency while budgets are managed in ZAR. Assign each team an evidence budget covering ingestion, storage, query and export. The budget should be visible beside reliability targets, not hidden in a platform invoice.
Useful controls include:
- Set per-tenant ingestion limits and query concurrency limits.
- Review unused dashboards, recording rules and alert queries quarterly.
- Downsample or aggregate metrics after the period requiring fine-grained analysis.
- Keep high-resolution traces for incident windows and representative samples elsewhere.
- Place regional collectors near workloads to reduce cross-border traffic.
- Measure the cost of verbose logging before enabling it globally.
Do not optimise solely for bytes. A cheap signal that engineers cannot correlate is operationally expensive. The best measure is investigation efficiency: how quickly can an engineer move from a failed SLO to the responsible service, dependency or infrastructure boundary?
Turn optimisation into a quarterly engineering practice
Telemetry quality decays as quickly as architecture. New labels appear, teams add verbose logs for one incident, and temporary alerts become permanent. Treat the telemetry estate like production code.
- Review the top metric series by cardinality and identify owners.
- Inspect Loki stream counts and the most expensive LogQL queries.
- Compare trace volume, sampling decisions and retained error coverage.
- Test collector behaviour during a simulated WAN outage or power interruption.
- Validate that dashboards and alerts still map to current SLOs.
- Check retention, access controls and redaction against POPIA requirements.
Enterprise Telemetry Optimisation Strategies work when every signal has a purpose, every label has a cost, and every retention decision has an owner. Prometheus and Mimir should answer fleet-wide questions quickly; Loki should explain application events without becoming a data landfill; Tempo should preserve the causal path through distributed systems. Grafana then becomes the place where those answers meet, rather than another destination engineers must search during an outage.
The result is not less observability. It is observability with enough discipline to survive scale, unstable connectivity and the next 02:13 incident.