Join our Newsletter — 33% off our NHI Course
Home› FAQ› Governance, Ownership & Risk› When should teams retain all traces instead of…
Governance, Ownership & Risk

When should teams retain all traces instead of sampling them?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated November 9, 2026 Domain: Governance, Ownership & Risk

Teams should retain all traces when they support incident forensics, security investigations, regulated audit needs, or low-volume production paths where every span matters. Full retention is also justified for new services, critical customer journeys, and suspected failure investigations. Sampling is less suitable when missing a single trace would hide the root cause or break evidence collection.

When to Keep Every Trace Instead of Sampling

Keep all traces when the trace stream is part of a security, forensic, or accountability workflow rather than just performance analysis. The practical test is whether losing a single span would materially weaken reconstruction, root-cause analysis, evidence preservation, or review of a low-volume path where each request is meaningful.

Full retention is also the safer default for newly launched services, customer journeys with high business impact, and investigations where the failure mode is not yet understood. In those cases, sampling can remove the very evidence needed to prove what happened, when it happened, and which dependency or request path was involved.

Where Sampling Becomes a Bad Trade-Off

Sampling works best when traffic is high, request paths are well understood, and you are measuring trends rather than reconstructing incidents. It becomes a poor fit when the observability goal is evidentiary, because the value of the trace is in completeness, not representativeness. That is especially true for low-volume production paths, where one dropped trace may equal one missing incident record.

For regulated or audit-sensitive environments, the question is not only storage cost. It is whether the retained data is sufficient to support review, demonstrate control operation, and answer who-did-what-when questions without gaps. In those settings, trace loss can create a documentation problem even when the system itself keeps running normally.

Where the journey is critical to revenue or customer trust, missing traces can also hide intermittent defects that only appear once in many requests. The more a path depends on rare timing, external services, or multi-step authorization, the less useful random sampling becomes as a diagnostic tool.

How to Decide Which Paths Deserve Full Retention

A practical retention policy should treat trace volume and trace importance as separate variables. Keep everything for services or endpoints where one request can trigger a major financial, operational, or security consequence. Sample only where you can tolerate blind spots and still reconstruct the important behaviour from the remaining telemetry.

When you are unsure, start with full retention for new code, new integrations, and suspected failure windows, then narrow later if the data proves stable. If a path is low-volume but business-critical, that usually argues for retention over sampling because the storage burden is limited while the diagnostic value is high.

For teams building structured tracing programmes, the observability controls in LLM Observability Guide show how retention, safe capture, and tail sampling fit together when every span may carry operational or security significance.

Risk and Threat Considerations

Sampling can create a false sense of visibility. If the omitted trace contains the only evidence of a failure, abuse path, or privilege-relevant event, the organisation may miss both the root cause and the timeline of compromise. That risk grows when traces are used for incident forensics, regulated review, or detection of rare but important failures.

Failure mechanism: Random or policy-driven sampling drops the one trace that links a request, dependency, or error condition to the event that matters, leaving investigators with an incomplete record.

Impact: Teams may be unable to reconstruct incidents, prove control operation, or distinguish an ordinary defect from a security-relevant sequence, which weakens both response quality and audit defensibility.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST CSF 2.0 and CIS Controls v8 set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0DE.CM-01 — Monitoring for Anomalies and EventsTrace retention supports anomaly and incident visibility in operational systems.
RS.AN-03 — Analyze forensic dataFull traces are often required for post-incident analysis and root-cause reconstruction.
Recommendation — Retain trace data where needed to sustain event monitoring and incident reconstruction. Preserve complete trace evidence for forensic analysis when incidents are suspected.
ISO/IEC 27001:2022A.8.15 — LoggingTrace retention is a logging design choice affecting auditability and investigation depth.
A.8.16 — Monitoring activitiesObservability retention supports monitoring, detection and review of operational behaviour.
Recommendation — Define logging retention so traces remain available for investigations and audits. Keep sufficient telemetry to support monitoring and review of critical paths.
CIS Controls v8CIS-8 — Audit Log ManagementTrace retention is directly tied to preserving logs for investigations and compliance.
Recommendation — Preserve and centrally manage traces needed for audit and incident response.

Practitioner Guidance

What to prioritise: Retain full traces first for any path where a single request can support an investigation, an audit, or a business-critical decision. That includes new services, low-volume production flows, and suspected failure windows where completeness matters more than storage efficiency.

Decision rule: If the trace could become evidence, treat sampling as an exception that needs explicit approval and a documented rationale. If the trace is only for trend analysis, sampling is usually acceptable as long as the loss of detail will not block later root-cause work.

What practitioners underestimate: The real cost of sampling is often not storage, but irrecoverable context. Once the relevant span is gone, neither better dashboards nor more alerting can recreate the missing chain of events.

Practitioner takeaway: Keep all traces wherever completeness is part of the control objective, because the value of observability is lowest exactly where evidence is missing.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 9, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org