The engineering observability data retention decision record: why the data retention model you chose determines your retrospective debugging ceiling and your observability storage cost surface

Observability data retention decisions are made once — when log pipelines are first configured, when metrics backends are first selected, when trace storage policies are first written — and rarely revisited until a data integrity incident is discovered 9 days after it occurred and the logs that would have identified the root cause in 2 hours have been purged, an observability infrastructure bill grows to 68% of total cloud spend and the platform team discovers that 94% of all queries touch data less than 7 days old, or a SOC 2 preparation exercise reveals that security access logs were purged alongside debug logs at the same 90-day retention window for the past 2 years. The signal retention window model, the tiering model, the resolution degradation model, and the security log separation model are founding decisions about how far back the team can debug, what that debugging capability costs, and whether compliance evidence exists when it is required.

A 20-person developer tools startup had built a data processing pipeline that ran batch import jobs for users who uploaded CSV files from third-party data sources. The pipeline had been in production for 14 months. At infrastructure setup, the founding engineer had configured the application log retention at 7 days. The decision had been implicit — the managed logging service defaulted to 7 days on the free tier, and the team had never explicitly discussed whether that window was appropriate. Storage cost was the primary concern at the time; the team was spending carefully on infrastructure during pre-revenue growth, and 7 days of log retention cost $14 per month versus $89 for 30 days. The 7-day window stayed in place after the team reached revenue, carried forward by inertia rather than intentional evaluation.

On a Thursday afternoon, a data quality engineer ran a weekly consistency check on the user data tables. The check compared row counts and checksum values across related tables and flagged anomalies. This week, the check returned 2,400 rows in the user_import_records table where the parsed_value field contained a null despite the source_value field being populated — a silent data corruption where the parsing step had accepted the input but produced no output. The 2,400 rows belonged to 47 different user accounts. The engineering team was notified immediately.

The first question in the incident channel was straightforward: which background job run caused this? The import pipeline ran on a scheduled cron every 4 hours and was the only system that wrote to parsed_value. The engineers needed the application logs from the import job runs for the past 10–14 days — the range that covered when the corrupted rows might have been created, based on the create timestamps in the database. The create timestamps showed the affected rows had been written between 9 and 11 days ago.

The logs were gone. The 7-day retention window had purged everything older than the past week. The job runs that had produced the corrupted records had executed 9–11 days earlier, 2–4 days before the purge window began. The engineers could see the corrupted rows in the database. They could not see the logs that would have shown what input had triggered the parsing failure, which specific code path had been executed, what error handling had run, or whether the failure was deterministic (always triggered by a specific input pattern) or stochastic (triggered by a timing issue or resource contention).

The team spent 6 days reconstructing what had happened. They pulled the original source files from the users' connected accounts (available because the third-party data sources retained their data independently). They ran the import pipeline in a local environment against each of the 2,400 source rows, trying to reproduce the parsing failure. After 2 days of this, they identified a likely culprit: a Unicode normalization edge case in the CSV parsing library that produced a null output for certain characters in specific field positions. They could not confirm it was the same edge case without the logs. They patched the parsing library, ran the fix across all 2,400 affected rows, and verified the corrected values against the source data. The manual audit and correction took 6 days of two engineers' time.

The post-incident analysis included one uncomfortable calculation: if the application logs had been retained for 30 days, the investigation would have taken approximately 2 hours. The engineer would have queried the import job run logs for the timestamp range covering the corrupted rows, identified the specific job run, pulled the error events from that run, seen the exact exception message from the parsing library, identified the input that triggered it, confirmed the edge case, written the fix, and verified the correction — all without manual reproduction attempts or guesswork about which of a dozen possible root causes was the actual one. The 6-day investigation was a consequence of a $75/month infrastructure decision made 14 months earlier during a pre-revenue cost-control period that had never been revisited.

A 45-person B2B SaaS had built an analytics platform. The team had adopted the philosophy that observability data should be retained comprehensively — "you never know what you'll need for debugging" — and had configured their monitoring stack to retain everything at full resolution: raw 10-second metric samples, all distributed trace spans including internal health check probes and scheduled job execution spans, full application logs at DEBUG level in the production environment. The retention window for all signals was 2 years.

The philosophy was not irrational. The team had been burned twice in the previous 3 years by incidents where the signal they needed had been unavailable: a database connection pool exhaustion that required 15-minute metric resolution to diagnose, and an authentication service failure that required trace-level context to understand the dependency chain. After both incidents, the team had extended their retention windows. "We spent $3,000 in engineering time debugging something we could have solved in an hour with the right data" was a phrase that appeared in both incident retrospectives. The team had concluded that comprehensive retention was the correct economic decision.

Two years into this model, the head of platform reviewed the monthly cloud infrastructure bill with the CFO as part of a quarterly cost optimization exercise. The observability line item was $14,200 per month — against a total cloud infrastructure bill of $20,900. Observability storage represented 68% of total cloud spend. The platform team's application compute, database, and networking costs combined were $6,700. The team was spending more on retaining observability data than on running the product.

The platform engineer ran a query across the observability stack's internal access logs: how much of the retained data, broken down by signal type and age, had actually been queried in the past 12 months? The results were more concentrated than anyone expected. 94% of all queries touched data less than 7 days old. 99% touched data less than 30 days old. The 10-second raw metric samples beyond 24 hours — retained at significant cost across the full 2-year window at hot-tier storage pricing — had been accessed in 3 queries in 12 months, all three during the same incident postmortem. The trace spans for health check endpoint probes and scheduled job executions — which made up 34% of total trace volume — had never been queried at all; engineers filtered them out of trace queries because they were noise in the trace search results.

The team had been paying for the full distribution of the data it retained, but only 1% of that data was responsible for 99% of the value being extracted. The philosophy of "retain everything because you never know what you'll need" had been correct about the incident postmortem scenario — the two incidents that had motivated the philosophy were real, and the data had been valuable when queried. What the philosophy had not accounted for was that the same coverage could be achieved at a fraction of the cost by tiering the retention: retain the full resolution data for the window where it's actually queried (7 days at high resolution, 30 days at reduced resolution), then transition to archival storage for the long tail that is queried only during exceptional circumstances. The monthly observability cost under a tiered model — hot tier for 7 days, warm tier for 90 days, cold archival tier for 2 years — was estimated at $3,100: $11,100 per month less for essentially equivalent debugging capability, with the rare long-tail query requiring a cold-tier restore that takes 15–30 minutes rather than an instant query. The team had been paying $11,100 per month in hot-tier storage premiums for a 15-minute query latency difference on incidents that occurred 3 times in 2 years.

A 70-person enterprise SaaS had built a workflow automation platform and had been growing steadily, reaching contracts with four enterprise customers who had signed data processing agreements. The compliance team had been building toward SOC 2 Type II certification, which the enterprise sales team had been promising prospects as a Q3 deliverable for 18 months. With the audit firm engaged and the audit window approaching, the compliance lead ran a systematic review of the evidence the team would need to produce.

SOC 2 CC6.2 covers logical access provisioning — evidence that the team has controls in place that ensure access to production systems is provisioned appropriately and reviewed. CC6.3 covers removal of access when no longer needed. Both require the auditor to test the controls in operation over the audit period by reviewing samples of access events: who was given access to what systems, when, by whom; who had access removed, when, by what process. The standard audit sample covers 1 year of access events.

The compliance lead asked the platform engineer for the access logs covering the past 14 months. The platform engineer pulled the log retention configuration. Application logs, including the authentication service logs that recorded user logins, API access events, admin console access, and service-to-service authentication — all retained for 90 days. The retention window had been set at infrastructure setup and had never been evaluated for compliance fitness. The team had been purging 10 months of access log history every quarter.

The 14 months of access log evidence the SOC 2 audit required did not exist. The most recent 90 days did. The 10 months before that had been systematically deleted by the retention policy. The compliance lead had three options. First: delay the audit by 9 months to accumulate the required retention history under a corrected retention policy, losing the Q3 delivery commitment and the enterprise contracts that were contingent on it. Second: proceed with an audit scoped to the available 3-month window, understanding that the auditor would likely issue a qualified opinion or note a scope limitation that would not satisfy the enterprise customers' requirements. Third: reconstruct the access history from alternative sources — the identity provider's audit logs, the cloud provider's CloudTrail or equivalent access logs, the authentication service's database records — to produce a defensible but non-primary evidence trail that covered the full 14-month period.

The team chose option three. Three engineers spent 4 weeks pulling access events from the identity provider's audit export API (which retained 12 months), correlating them with available CloudTrail data for infrastructure access, writing extraction scripts to reconstruct user session events from the authentication database's created_at timestamps, and formatting the reconstructed data into the evidence format the auditor required. The result was accepted by the auditor as sufficient for the initial certification period but noted as a deficiency — the team was required to implement a compliant logging infrastructure before the annual surveillance audit. The 4-week reconstruction effort cost approximately $45,000 in engineering time. The enterprise contracts were preserved, but only by work that would have been entirely unnecessary if the access log retention had been 2 years from the start.

The post-remediation analysis identified what a correct security log separation model would have looked like: a distinct log pipeline for access and authentication events routed to a compliance-designated storage bucket with 2-year retention and immutable write-once semantics, separate from the operational log stream with its 90-day retention for debugging purposes. The infrastructure change itself was 2 days of work. The separation model had not been implemented because no one had explicitly evaluated the compliance retention requirements against the retention policy at infrastructure setup time — both decisions had been made independently, by different people, with no handoff between the compliance requirements and the platform configuration.

Structural properties set by the observability data retention decision

Two structural properties are determined by the founding decisions about retention windows, storage tiering, and signal type separation. Both are invisible during normal operations — the product runs, incidents are resolved, and the retention model's constraints are not visible in dashboards. Both become visible when an incident's root cause cannot be investigated because the evidence has been purged, when a cost optimization exercise reveals that the observability infrastructure is consuming more budget than the product infrastructure it is meant to monitor, or when a compliance review requires records that the retention model systematically deleted.

Property 1: Retrospective debugging ceiling. The retrospective debugging ceiling is the structural limit on how far back in time the engineering team can investigate an incident using their observability stack. The ceiling has three components. The signal retention window component is the most direct: the debugging ceiling for any incident class is defined by the shortest retention window in the observability stack for the signal types relevant to that incident class. Data integrity incidents, billing discrepancies, gradual performance degradation, and silent failures — incident classes where the triggering condition is discovered days or weeks after the event rather than in real-time — require retention windows that exceed the discovery latency for those incident classes. A team whose retention windows were sized for real-time incident response (the engineer notices the alert, investigates, resolves within hours) will discover that those windows are insufficient for the incident classes where discovery is delayed. The critical evaluation is not "how long does it take us to respond to alerts" but "how long after a problem occurs do we discover it, across all problem classes." The resolution degradation component is determined by whether the observability stack retains raw signal granularity or downsamps older data to aggregated resolutions. Resolution degradation is an intentional, economically justified trade: a team that retains raw 10-second metrics for 24 hours and transitions to 5-minute aggregates thereafter is accepting that sub-minute resolution is unavailable for incidents older than 24 hours, in exchange for dramatically lower storage cost. The ADR must make this trade explicit — the team should evaluate which incident classes require sub-minute resolution and whether those incidents are discovered within the raw resolution retention window, rather than discovering during a postmortem that the resolution they needed was lost. The cross-signal correlation component is determined by whether the team can join logs, traces, and metrics for the same time window. Correlated debugging — connecting a log error event to the distributed trace that produced it, or connecting a metric spike to the deployment event that preceded it — requires all three signal types to be available for the same time window. Connect this to the observability strategy decision record: the strategy decisions about which signals to instrument and what instrumentation granularity to use determine what signals are available to retain; the retention model is downstream of the instrumentation model — a team that has not instrumented distributed traces cannot retain them, and a team that retains traces for only 7 days cannot correlate a log event from day 10 to its trace context even if the instrumentation would have enabled it.

Property 2: Observability storage cost surface. The observability storage cost surface is the total infrastructure spend attributable to storing observability signals, determined by the interaction between signal volume, retention windows, storage tier selection, and the fraction of retained data that is actually queried. The volume-window-tier interaction component is the primary cost driver: signal ingestion volume multiplied by retention window multiplied by storage tier unit price. Teams that retain all signals at hot-tier pricing pay the highest rate for data that is rarely queried; the economic case for tiered storage is that the query latency tradeoff (seconds for hot, seconds-to-minutes for warm, minutes-to-hours for cold) is acceptable for the access frequency of older data. Connect to the observability cost governance decision record: cost governance decisions about cardinality management and anomaly detection address the volume component — high cardinality metrics and anomalous volume growth are upstream cost drivers that the retention tiering model cannot address alone; the two decisions work in combination: cardinality governance bounds the ingestion volume per signal, while retention tiering bounds the cost per unit of retained volume; a team that has resolved cardinality issues but retains all data in hot tier, or a team that has implemented retention tiering but has unbounded cardinality, will find that the reduction from one decision is consumed by the other. The fraction-actually-queried component is the most actionable insight from a cost optimization exercise: if 99% of observability queries touch data less than 30 days old, the retention spend beyond 30 days at hot-tier pricing is recovering very little value per dollar. The correct economic model is not to delete data beyond 30 days but to transition it to cold archival storage, where it remains available for the exceptional query at a fraction of the hot-tier cost. The 2-year retention window that costs $14,200/month in hot tier costs approximately $700/month in cold archival storage — the coverage is equivalent; the query latency for cold-tier data is higher, but for quarterly audits and rare forensic investigations, 15–30 minutes of cold restore time is an acceptable tradeoff.

The observability data retention ADR: five sections

Section 1: Signal retention window model. The signal retention window model defines the retention period for each distinct signal type and log level in the observability stack. The ADR must specify retention windows at a level of granularity that maps to actual decision points — not "logs are retained for 90 days" but "debug logs are retained for 48 hours; info logs for 30 days; warning logs for 90 days; error logs for 1 year." For distributed traces, the model must distinguish between standard execution spans retained for 7 days, error spans retained for 30 days, and sampled complete traces from incident postmortems retained for 90 days. For metrics, the model must specify the resolution at each retention window: raw 10-second resolution for 24 hours, 1-minute aggregates for 30 days, 5-minute aggregates for 1 year, 1-hour aggregates indefinitely. Each retention window must be justified against the incident discovery latency for the incident classes the signal supports. The evaluation process for the ADR: list the incident classes the team has experienced or anticipates — real-time failures discovered within minutes, data integrity issues discovered during weekly checks, billing discrepancies discovered during monthly reconciliation, security access anomalies discovered during quarterly audits, compliance gaps discovered during annual certifications. For each class, estimate the discovery latency: not "how fast do we respond" but "how long after the problem occurs before we know to look." The retention window for each signal type must exceed the discovery latency for the incident classes that require that signal type. A retention window that is sized for real-time incident response will be insufficient for delayed-discovery incident classes. Connect to the logging strategy decision record: the logging strategy decisions about which events are logged, at which level, and in what format determine the information density of each retained log entry — a dense, structured INFO log event capturing user identifier, action, resource, outcome, and duration is more valuable per byte than a verbose DEBUG log paragraph containing the same information padded with internal state; the retention model's cost per unit of debugging value is better for structured, information-dense logs, which is an argument for structured logging as an upstream complement to retention tiering rather than a separate optimization.

Section 2: Signal tiering model. The signal tiering model defines the storage tier for each signal type at each point in its retention lifecycle, including the automatic tier transition schedule and the query latency commitment for each tier. Three tiers serve most observability storage needs. Hot tier — fast SSD or in-memory storage, query latency under 1–2 seconds — is appropriate for signals queried during active incident response: the last 24–48 hours of logs and traces where the engineer needs to iterate through hypotheses quickly, and the last 7 days of metrics at their query-resolution for dashboards and alert evaluation. Hot tier is the most expensive per GB and should contain only the minimum dataset required for incident-response-speed queries. Warm tier — HDD or object storage with indexing, query latency 5–30 seconds — is appropriate for signals queried during post-incident analysis and routine investigation: logs up to 90 days, traces up to 30 days, aggregated metrics up to 1 year. Warm tier costs 60–80% less per GB than hot tier for approximately equivalent query capability at higher latency; the latency is acceptable for retrospective analysis. Cold tier — archival object storage, restore latency 15 minutes to 4 hours before query — is appropriate for signals retained for compliance or forensic purposes but rarely queried: access and security audit logs beyond 90 days, error logs beyond 1 year, long-tail metric history. Cold tier costs 80–95% less per GB than hot tier; the restore latency is acceptable for audit investigation and rare forensic queries. Tier transitions must be automatic: configure automatic transitions using the lifecycle management features of the log storage backend (Elasticsearch ILM policies, Datadog log archiving, S3 lifecycle rules, Loki ruler configurations) rather than relying on manual operations that will be deprioritized during incidents. The ADR must specify the restore time objective for cold-tier data — not for performance guarantees but to make the latency tradeoff explicit when engineers build tooling or runbooks that might attempt to query cold-tier data. Connect to the observability platform decision record: the platform selection decisions determine which tiering capabilities are natively available versus which require additional engineering — some platforms include hot/warm/cold lifecycle management as first-class features; others require external integration with cloud object storage for cold archival; the tier transition implementation cost depends on the platform choice, and the tiering model's economic case depends on the platform's tier pricing differential.

Section 3: Resolution degradation model. The resolution degradation model defines the downsampling schedule for time-series metric data: how the resolution of retained metrics decreases as data ages, and what aggregation functions are preserved at each resolution level. Downsampling reduces storage cost dramatically — a 10-second resolution metric downsampled to 1-minute resolution requires 83% less storage per data point, and a further downsampling to 5-minute resolution requires another 80% reduction — while retaining the aggregated signal needed for trend analysis, capacity planning, and incident correlation. The downsampling schedule should match the query patterns that occur at each age range: for data less than 24 hours old, sub-minute resolution is needed for real-time dashboards and incident correlation; for data between 24 hours and 30 days old, 1-minute resolution is sufficient for most post-incident analysis queries; for data between 30 days and 1 year old, 5-minute resolution supports capacity planning and trend analysis; for data beyond 1 year, 1-hour resolution is sufficient for annual business reviews and long-horizon capacity modeling. The ADR must specify the aggregation functions preserved at each downsampling step. Storing only the mean of a 10-second metric downsampled to 1 minute loses the spike behavior — a request duration spike that lasted 15 seconds and peaked at 850ms is recorded in the 1-minute mean as 42ms, invisible against the baseline. The correct aggregation set for a 1-minute downsampling step is: count, sum, min, max, and approximate percentiles (p50, p90, p99 estimated from the t-digest or DDSketch of raw values). The sum enables rate recalculation. The min and max preserve the range. The percentiles estimate the latency distribution without storing every raw sample. Teams that store only mean values in their downsampled metrics will find that their 1-minute aggregates do not support the percentile queries that drive SLO calculations and alert thresholds — a problem that surfaces when the team tries to calculate the p99 latency for the past 6 months and discovers that the percentile estimation from mean-only downsampled data is not statistically valid. The resolution degradation ADR should be reviewed alongside the alert threshold and SLO calculation ADR to ensure that the aggregation functions preserved during downsampling support the alert and SLO queries that will be evaluated against that data.

Section 4: Security and audit log separation model. The security and audit log separation model defines the boundary between security-relevant access events that require compliance retention and operational debugging logs that require shorter retention for cost management. The separation is not a query-time filter — it is a pipeline-time routing decision that sends security-relevant events to a distinct storage location with its own retention policy, access control, and immutability guarantee before they can be commingled with operational logs and purged at the operational retention schedule. The ADR must specify four things. First: the event categories that constitute security audit log entries requiring compliance retention. These include user authentication events (login, logout, session establishment, token issuance, token revocation), authorization decisions for sensitive resource access, privileged action events (admin console access, permission grants, permission revocations), API access events for data export and bulk query endpoints, infrastructure access events for production database and secrets management systems, and service-to-service authentication events. Second: the compliance retention requirement for the security audit log stream. This should be derived from the highest retention requirement across the compliance frameworks the team must satisfy — SOC 2 (1 year minimum, 2 years recommended for audit defensibility), GDPR Article 5(2) (varies by data category and processing purpose), HIPAA (6 years), PCI DSS (1 year online plus 3 years archival). Connect to the audit log decision record: the audit log decisions about what events constitute an auditable action and what fields each audit log entry must contain are upstream of the separation model — if the audit log decision record has not been written, the security log separation model cannot be implemented correctly because the event categories and required fields have not been defined. Third: the immutability guarantee. Security audit logs should be stored with write-once-read-many semantics. This is typically implemented via S3 Object Lock in COMPLIANCE mode, Cloud Storage bucket locks, or equivalent mechanisms that prevent deletion or modification by any IAM role including the application and infrastructure principals that write to the stream. The immutability guarantee is what makes the audit log evidentiary — an auditor can trust a log that cannot have been modified between the event and the review. Fourth: the access control boundary. Security audit log storage should have a distinct IAM or RBAC policy that restricts read access to security engineers, compliance officers, and incident response roles, separate from the operational log access policy that allows all production engineers to query application logs for debugging.

Section 5: Measurement model. The measurement model defines the metrics that confirm the retention decisions are producing their intended outcomes, the measurement frequency, and the investigation triggers for when the measurements indicate the model is failing. Five measurements. Retention coverage ratio: for each distinct incident class the team has responded to in the past 12 months, what percentage of incidents had the required signals available at the time of investigation? A coverage ratio below 100% means the retention model's windows are shorter than the discovery latency for at least one incident class, and the incidents where signals were unavailable represent a sample of the debugging ceilings the team will continue to encounter until the retention windows are corrected. Query this by reviewing incident postmortems for notes about signals being unavailable, purged, or at insufficient resolution. Storage cost per signal type per TB-month: break down the monthly observability infrastructure cost by signal type (application logs, trace spans, metrics time-series, audit logs) and by retention tier (hot, warm, cold). Teams that cannot see this breakdown cannot identify which signal type or tier is driving cost growth. When one signal type's cost grows faster than the team's traffic growth rate, the volume component (cardinality, log level, trace sampling rate) or the tier placement (data that could be in warm tier remaining in hot tier) is the upstream cause. Cold tier utilization rate: the fraction of observability storage volume in cold tier vs. hot and warm tiers. For teams with a correctly implemented tiering model, 70–85% of retained data volume should be in cold tier — most data, by volume, is old data that is rarely queried. A cold tier utilization rate below 50% suggests either that tier transitions are not executing correctly, that the transition thresholds are set too conservatively, or that data is being written to hot tier without automatic transition policies configured. Compliance log retention completeness: monthly automated check that the security audit log stream contains continuous records covering the required compliance retention window with no gaps. The check should alert if any day in the retention window has zero audit log events (indicating a potential pipeline gap, not just an idle day) or if the total audit log retention falls short of the compliance minimum. This is a standing audit of the audit log itself — a check that will surface the problem before the SOC 2 preparation exercise, not during it. Cross-signal correlation coverage: the percentage of error log events in the most recent 7 days that have a corresponding distributed trace span available for correlation. A healthy observability stack with aligned retention windows and consistent instrumentation should be able to correlate most error log events to trace context. Correlation coverage below 70% indicates either that the trace sampling rate is too low for the error rate, that the trace retention window is shorter than the log retention window causing desynchronization, or that trace context identifiers are not being propagated into log events correctly, making correlation impossible even when both signals are retained.

FAQ

What is the minimum log retention window for a production system, and how should it vary by log level?

There is no universal minimum, but there are practical lower bounds driven by incident discovery latency. The critical question is: for the incident classes most likely to affect your system, how long after the incident occurs do you typically discover it? If a data integrity issue is discovered during a weekly data quality check, your logs need to survive at least 7 days. If your P1 on-call response time is under 30 minutes but your quarterly business review might surface a billing discrepancy from 3 months ago, you need logs at different levels for different windows. A practical per-level framework: debug logs (high volume, low signal) can be retained for 24–48 hours — they are useful for active debugging sessions and useless for post-hoc investigation because you have already written a fix by the time you review them retrospectively. Info logs (medium volume, moderate signal — service start, significant state transitions, user action summaries) should be retained for 30 days minimum; this covers most incident discovery windows including weekly reviews and customer-reported issues that arrive after a weekend. Warning logs (lower volume, higher signal — degraded state, unexpected but handled conditions, retry events) should be retained for 90 days; they are the signals most likely to precede an incident that isn't caught in real-time and whose root cause requires a window longer than the immediate response period. Error logs (low volume, high signal — unhandled failures, exception traces, assertion failures) should be retained for at least 1 year; error logs are the evidence trail for post-incident analysis, security investigations, and customer dispute resolution, and error log volume in a healthy production system is typically low enough that 1-year retention is not a meaningful cost driver compared to info and debug log volume. Access and security audit logs have compliance retention requirements that override the debugging retention model — these should be treated as a separate signal type with their own retention policy derived from your compliance framework, not set alongside operational logs.

How should teams approach hot, warm, and cold storage tiering for observability data?

The tiering model should match query latency expectations to the access patterns that actually occur. Hot tier — fast SSD or in-memory storage, query latency under 1 second — is appropriate for data queried during active incident response: the last 24–48 hours of logs and traces where the engineer needs to iterate quickly through hypotheses, and the last 7 days of metrics at raw resolution where real-time dashboards and alert queries operate. Hot tier is expensive per GB and you should retain only the data you will query at incident-response speed. Warm tier — HDD or object storage with indexing, query latency under 30 seconds — is appropriate for data queried during post-incident analysis: logs up to 90 days, traces up to 30 days, aggregated metrics up to 1 year. Warm tier costs 60–80% less per GB than hot tier for approximately equivalent query capability at slightly higher latency. The latency is acceptable for retrospective analysis. Cold tier — archival object storage, query latency measured in minutes to hours — is appropriate for data retained for compliance but rarely queried: access and security audit logs beyond 90 days, error logs beyond 1 year, aggregated metric history beyond 2 years. Cold tier costs 80–95% less per GB than hot tier. The tier transition schedule should be automatic, not manual: manual transitions are rarely executed because they are deprioritized whenever an incident occurs. Configure retention policies in your log storage backend (Elasticsearch ILM, Loki ruler, Datadog retention settings, S3 lifecycle policies) to execute tier transitions automatically at the specified age thresholds. The ADR must specify the tier-transition schedule, the restore time objective for cold-tier data, and the query latency budget for each tier — not to enforce them in code but to make the implicit latency tradeoff explicit so that engineers building debugging tools know what storage layer to target for which query time range.

Why should security audit logs be stored separately from operational logs, and what does separation require?

Security audit logs and operational debugging logs have different consumers, different retention requirements, different access control requirements, and different immutability requirements — four independent reasons why commingling them in the same log stream and storage location creates structural problems. Consumer difference: operational logs are queried by engineers debugging production incidents; security audit logs are queried by compliance officers, security engineers, and auditors reviewing who accessed what data, when, from what session context, and whether the access was authorized. These are different people with different query patterns and different permission levels — an engineer debugging a database slow query does not need to see the security audit log for user authentication events, and a compliance auditor should not have access to debug logs that may contain sensitive request payloads. Retention requirement difference: SOC 2 CC6.2 and CC6.3 require access control evidence for the audit period — typically 1 year for Type II certification. GDPR Article 5(2) requires demonstrating accountability for personal data processing. HIPAA requires audit log retention for 6 years. PCI DSS requires 1 year online with 3 months immediately available. These compliance windows are longer than the debugging retention windows for most operational logs, and they cannot be shortened without creating compliance gaps. Access control difference: security audit logs should be accessible to a narrowly defined set of principals — security engineers, compliance officers, designated incident response roles — not to all engineers with access to production logs for debugging. Immutability requirement: compliance audit logs should be stored with write-once-read-many semantics in a bucket where no role can delete or modify records. This is the technical foundation of the audit log's evidentiary value. Separation requires: a distinct log stream at the application layer where audit log entries are written to a separate logger or sink; a distinct storage location with its own retention policy and access control policy; immutable backup storage (S3 Object Lock, GCS bucket lock, or equivalent) for the compliance retention period; and documentation of which event types constitute security audit log entries that must flow through the compliance stream.

How do observability data retention decisions connect to AI chat sessions and decision preservation?

Observability data retention decisions are made in AI chat sessions when infrastructure leads work through three questions that feel like configuration choices but are structural decisions with multi-year consequences: the retention window model — how long should we keep logs at each level, what are we optimizing for, what is the minimum window that covers our actual incident discovery latency; the tiering model — what is the cost tradeoff between hot and cold storage for data beyond the active debugging window, what query latency is acceptable for retrospective analysis, should we pay for 2 years of hot-tier storage for data we query once per quarter; and the security log separation model — do security audit logs need to be separate from debug logs, what compliance requirements apply, what immutability guarantee is required. The reasoning in those sessions is the substance of the retention model — more so than the Elasticsearch ILM policy that executes tier transitions, the S3 lifecycle rule that moves logs to Glacier after 90 days, or the log router configuration that sends audit events to a separate sink. Running those AI chat sessions through the open-source extractor produces the retention decision record that allows the next platform engineer to understand why the team chose 7-day debug log retention — because at infrastructure setup time the team lead estimated that 7 days covered 95% of incidents by discovery latency and storage cost was the primary constraint — and why that decision was correct at the time and wrong when applied to a data integrity incident class with a 9-day discovery latency. Without the reasoning session, the next platform engineer sees a 7-day retention policy and cannot distinguish a deliberate cost-constrained choice from an unchanged default — which matters because the correct response is different: a deliberate choice requires a retention model review against the current incident history, while an unchanged default requires immediate correction. Those reasoning sessions exist in the AI chat history of the platform lead, not in the Terraform variable that sets the index retention period to 7 days.

Further reading

  • Observability cost governance decision record — cost governance decisions about cardinality management and cost anomaly detection address the volume component that the retention tiering model cannot address alone; a team that has implemented retention tiering but has unbounded high-cardinality metrics will find that the tiering savings are consumed by volume growth; the two decisions work in combination: cardinality governance bounds the ingestion volume per signal, while retention tiering bounds the cost per unit of retained volume; the retention ADR should reference the cost governance ADR to confirm that the cost model accounts for both the tiering efficiency and the volume trajectory, since a 76% tiering cost reduction that co-occurs with a 400% year-over-year metric cardinality growth produces a net cost increase.
  • Data retention decision record — the compliance and legal data retention decisions for user and customer data are distinct from the observability signal retention decisions but interact at the security audit log stream: observability access logs that record which users accessed which customer data are both operational signals and compliance evidence under GDPR and SOC 2; the data retention ADR defines the compliance retention requirements for personal data processing records; the observability retention ADR defines the operational retention windows for debugging signals; the two must be reviewed together to ensure that the access logs constituting compliance evidence under the data retention ADR are retained at the compliance window specified there, not discarded at the operational window for debugging logs.
  • Observability strategy decision record — the strategy decisions about which signals to instrument, what instrumentation granularity to use, and what sampling rates to apply determine what signals are available to retain; the retention model is downstream of the instrumentation model; a team that has not instrumented distributed traces cannot retain them, and a team that retains traces for only 7 days cannot correlate a log event from day 10 to its trace context even if the instrumentation would have enabled it; reviewing the instrumentation model alongside the retention model ensures that the retention windows are sized for the signal types the team actually collects, not for a hypothetical complete instrumentation that has not been implemented.
  • Observability platform decision record — platform selection decisions determine which tiering capabilities are natively available versus which require additional engineering; some platforms include hot/warm/cold lifecycle management as first-class features with GUI configuration; others require external integration with cloud object storage for cold archival, adding engineering overhead to the tier transition implementation; the tiering model's economic case depends on the platform's tier pricing differential; a platform that charges the same rate for hot and cold tier data eliminates the cost benefit of tiering and changes the retention model's cost optimization strategy from tier placement to retention window reduction.
  • Audit log decision record — the audit log decisions about what events constitute an auditable action and what fields each audit log entry must contain are upstream of the security log separation model; if the audit log decision record has not been written, the security log separation model cannot be implemented correctly because the event categories and required fields have not been defined; the audit log ADR specifies the event taxonomy that the log router needs to filter at pipeline time to route compliance events to the separate audit log sink; the two ADRs should be written together in the same planning session rather than treated as independent infrastructure and compliance decisions.
  • Open-source extractor — the reasoning behind observability data retention decisions lives in AI chat sessions: the infrastructure setup discussion about which retention window to configure for the managed logging service and what cost threshold justified longer retention, the debate about whether to implement tiered storage immediately or defer it until storage cost became a visible budget item, the security log separation discussion about whether the team's compliance framework required a distinct audit log stream or whether query-time filtering was sufficient; these are the conversations that contain the reasoning the next platform engineer needs to understand what the retention model was designed to do, what cost constraints shaped the initial windows, and what compliance requirements were or were not evaluated at the time the configuration was first deployed; running those sessions through the extractor produces the retention decision record that makes the log pipeline configuration legible as a set of deliberate decisions rather than a set of defaults that accumulated without explicit trade-off analysis.