Skip to content

Alerts

TraceLake has a bundle of 41 Prometheus alert rules. Each rule has a severity, a subsystem, a for: duration, and a runbook_url that points to a section of the runbook. The rules read the metrics on the metrics page. The Helm chart can install the bundle as a PrometheusRule.

Labels

Label Values Purpose
severity critical, warning, info Routing. critical pages; warning is a ticket; info never pages.
subsystem ingestor, gateway, compactor, catalog, maintenance, tail, tls Which part of TraceLake owns the response.

subsystem, not component, and that is deliberate. component is already a metric label on the catalog metrics, carrying the emitter (ingestor/compactor/maintenance). A static alert label of the same name silently overwrites it, and TraceLakeCatalogCommitConflicts would have reported its own group instead of naming the writer that was actually conflicting.

Deployment labels

Two labels come from the scrape, not from a TraceLake process. The rules need both:

Label Values Purpose
tracelake_release <namespace>/<release>: the Kubernetes namespace and the name of the Helm release. A release name is unique only in its namespace. Each rule keeps it: each aggregation is by (tracelake_release, ...) and each join is on (tracelake_release, ...). Two deployments with a dataset of the same name thus give two alerts, and each alert names its deployment.
tracelake_component ingestor, gateway, compactor, tail TraceLakeCompactorScrapeDown finds the up series of the compactor by it.

The Helm chart adds both labels with its ServiceMonitors, which it installs by default (prometheus.serviceMonitor.enabled: true, prometheus.podAnnotations: false). The PrometheusRule of the chart reads only the series of its own <namespace>/<release>, so each release gives its own alerts, one time. If your Prometheus has no Prometheus Operator, set both values the other way, and add the two labels in your scrape configuration:

relabel_configs:
  - source_labels: [__meta_kubernetes_namespace, __meta_kubernetes_pod_label_app_kubernetes_io_instance]
    separator: /
    target_label: tracelake_release
  - source_labels: [__meta_kubernetes_pod_label_app_kubernetes_io_component]
    target_label: tracelake_component

Without tracelake_component, TraceLakeCompactorScrapeDown does not fire. Without tracelake_release, the other rules work, but they add together the series of all deployments.

Thresholds that mirror TraceLake config

These are set to the configuration defaults and are plain values in the rules file. The Helm chart derives some of them from its values. A deployment that changes the underlying key must re-derive the threshold — nothing detects a changed key for you.

Alert Threshold Mirrors
TraceLakeWalDiskAboveHighWatermark 42949672960 bytes ingestion.wal.diskHighWatermarkPct (80) × the WAL volume size
TraceLakeWalBufferSaturated 214748364 bytes 80% of ingestion.wal.maxBufferedBytes (268435456). Unlike the disk watermark above, the chart re-derives this one from the key, so only the static bundle carries the literal
TraceLakeFreshnessAboveTarget 420 s The published P95 target. It is a fixed target, not a mirror of the sum: the four stages (maxFileAgeMinutes + upload + commitIntervalSeconds + snapshotPollIntervalSeconds) come to 343 s at defaults, leaving 77 s of headroom. Raising any of them spends that headroom and is not re-derived here — at maxFileAgeMinutes' 60-minute ceiling the sum is far past 420 s and this rule fires permanently on a correctly-configured deployment
TraceLakeJwksCacheStale 2880 s 80% of queryGateway.auth.maxJwksStalenessSeconds (3600)
TraceLakeColdTierLagNearBoundary 0 s of headroom maxFileAgeMinutes, commitIntervalSeconds and snapshotPollIntervalSeconds, for each dataset, through a series. The gateway sets cold_tier_lag_threshold_seconds to the longest healthy time between append commits (maxFileAgeMinutes × 60 + 15 s + 1.25 × (commit + poll), 350 s at the defaults) from its configuration. The rule fires when the commit age minus that series is more than 0. You do not re-derive it
TraceLakeCatalogSnapshotStale 60 s About 7 missed polls at snapshotPollIntervalSeconds: 8
TraceLakeCompactionBacklog 500 files The files-per-partition ceiling
TraceLakeIndexBackfillNotDraining any unindexed file No config key. The for: (36h) is what carries the threshold: it must exceed one compaction.schedule interval, since the backfill merge runs on the floor pass only
TraceLakeIndexBackfillOutOfReach any out-of-reach file No threshold key. The limit that puts a file out of reach is 2 × compaction.targetSizeMb, applied by the compactor when it sets the gauge, not by the rule
TraceLakeCompactorDeadlineExceeded any increase compaction.runtimeDeadlineHours (6), applied by the compactor, not the rule
TraceLakeCompactorEphemeralHigh 5153960755 bytes 80% of the chart's compactor.emptyDir.sizeLimit (6Gi). Not a TraceLake configuration key — the eviction it predicts is the kubelet's, against the volume's own cap — so the chart re-derives it from that value and only the static bundle carries the literal. Its for: (5m) must not outlive compaction.backlogCheckIntervalMinutes (5–120), since the gauge is a per-pass high-water mark the next pass overwrites. It equals that range's floor rather than clearing it: at an interval of 5 the only margin is the pass's own duration
TraceLakeCompactorRunsFailing any failed run in 3h compaction.backlogCheckIntervalMinutes — the lookback, not the threshold, mirrors it: a permanently failing daemon stays up and steps the counter once per tick, so a window shorter than the key's 120-minute ceiling reads 0 between failures and the alert flaps. Raise the lookback past any raised interval
TraceLakeCompactorNearCapacity 0.7 busy fraction over 3h compaction.backlogCheckIntervalMinutes. The window, not the threshold, depends on it. A dataset's duration is recorded once per pass, so the 3h rate moves one pass at a time. At the default 15 the window holds about 12 passes, and one more or less moves it about 8%. Above about 60 minutes it holds only 2 or 3 passes and swings across the line at each tick, so for: 1h keeps resetting and the rule can miss a real 80% load. Above 60, widen the window to about 6× the interval, and keep for: at most the window minus two ticks
TraceLakeMaintenanceTaskWedged 10800 s 3 missed passes at the default 60 of maintenance.expireSnapshotsIntervalMinutes and maintenance.orphanCleanupIntervalMinutes. Both keys accept 15–1440
TraceLakeTaskWedged 300 s No config key. 10 missed WAL age sweeps (30s) and 20 missed lag refreshes (15s). Both intervals are fixed — only a code change moves this number

TraceLakeWalDiskAboveHighWatermark is the one threshold with no default to inherit: the WAL volume size is a chart value, not a TraceLake config key, so the shipped number is 80% of a 50Gi reference volume. Set it per deployment or the alert is decorative.

TraceLakeWalBufferSaturated mirrors a key that does exist — ingestion.wal.maxBufferedBytes, 80% of it — and the chart re-derives the threshold from that key rather than shipping the static number, so raising the budget moves the alert with it. The static bundle carries 80% of the default.

TraceLakeMaintenanceTaskWedged is the second such case, for the opposite reason: its two keys have defaults, but both accept 15–1440, so a deployment that raises either above 60 minutes will see this fire permanently on a healthy compactor. Re-derive it from the configured interval.

Ingestion

Alert Expression, in words for: Severity Meaning
TraceLakeConsumerLagHigh lag > 1M on any partition 30m warning The ingestor is not keeping up. Check WAL disk first — polling pauses at the high watermark, so a full volume causes lag rather than resulting from it. → runbook
TraceLakeWalDiskAboveHighWatermark WAL bytes past the watermark 5m critical Kafka polling is paused. The drain is upload+commit, so check upload errors and catalog reachability. → runbook
TraceLakeWalBufferSaturated buffered records > 80% of maxBufferedBytes 30m warning The per-dataset record buffer is at its budget. Memory is bounded and nothing is failing — what is being paid is flush batch size, because the partitionMapping has opened enough segments that 1000 rows each no longer fit. Not backpressure. → runbook
TraceLakeUploadBacklog any ready_* file pending 30m warning Rotated WAL files are not reaching cloud storage, and the volume fills behind them. → runbook
TraceLakeUploadErrors upload error rate > 0 15m warning Uploads retry internally, so a blip is survivable; a sustained rate means the backlog grows faster than it drains. → runbook
TraceLakeConsumeErrors any increase over 1h 5m warning recv() errors arrive once per state change — a deleted topic produces a single error, so a rate-based rule would never fire. → runbook
TraceLakeReadyCleanupSlow cleanup P95 > 1s 30m warning WAL unlinks are blocking the commit path far past the sub-millisecond norm. Read with wal_ready_files to tell a large batch from a slow volume. → runbook
TraceLakeFreshnessAboveTarget freshness P95 > 420s 30m warning The published target is breached. The lag is in one of four stages: rotation, upload, commit batching, or the gateway poll. → runbook
TraceLakeRecordsDropped drop rate > 0 30m warning Payloads are failing to decode and are being dropped by the drain policy. Data is being lost silently — usually a producer-side schema change nobody announced. → runbook
TraceLakeWalSegmentOverfilled any increase over 1h 5m critical A WAL file closed holding more rows than its own Kafka offset range can contain — the same offsets were appended twice and the duplicate rows are already on disk, bound for Iceberg. No threshold to tune and no config key to mirror: a segment covering start..=end holds at most end - start + 1 rows, so every non-zero value is corruption rather than a tolerance being exceeded. increase, not rate, for TraceLakeConsumeErrors' reason — one overfilled segment is a single step. Its sibling wal_duplicate_records_total counts duplicates the append guard prevented and is deliberately not alerted on. Clearing is not repair: increase[1h] ages the alert out an hour after the last step, while the duplicate rows are permanent — resolution means no new occurrence. → runbook
TraceLakeWalStaleSpecFiles held-back files, increase over 1h > 0 1m critical WAL files written under a partition spec that the table has evolved past were not committed. Their rows are on the WAL volume and not in the table, and each boot holds them back again. Copy the files off, then remove them; start the next evolution from a drained fleet. Clearing is not repair: the alert stops while the rows are still missing. → runbook
TraceLakeSchemaNameDrift renamed columns > 0 1h warning parquetSchema still names a column the live table renamed. Boot tolerates it (identity is the field-id), but new data files carry the stale name. Not an outage; update config and roll. → runbook

Query gateway

Alert Expression, in words for: Severity Meaning
TraceLakeIndexCacheHitRatioLow windowed hit ratio < 0.8 30m warning Queries are re-reading sidecars from object storage. Raise indexCache.maxBytes (Puffin and Parquet footers, some with their page index) or indexCache.diskMaxBytes (.idx), whichever sits at its budget, or accept that the working set outgrew it. → runbook
TraceLakeSidecarMissRatioHigh > 20% of scanned files have no puffin/idx sidecar 30m warning Pruning is falling back to full scans. Sidecars are built at compaction only, so this usually means the compactor is behind. → runbook
TraceLakeManifestCacheThrash miss rate > 0 on a warm pod 1h warning The load→evict→load loop: the windows queries keep asking for do not fit under manifestCache.maxBytes (manifest lists + loaded manifests), and each query pays their manifest GETs again. → runbook
TraceLakeCatalogSnapshotStale snapshot age > 60s 10m critical A catalog outage. Queries keep serving the last good snapshot — they go stale, not down, so new data is invisible without anything erroring. The exception is a window whose manifests this pod never loaded (an older range, or any query on a pod restarted during the outage): that is a 503. → runbook
TraceLakeJwksCacheStale JWKS age > 80% of the cutoff 10m critical The window in which the OIDC provider can still be fixed. Past the cutoff, every query becomes a 503. → runbook
TraceLakePostgresTableResolveFailures resolve failure rate > 0 15m warning While one dataset fails to resolve, information_schema.columns fails for every other dataset too — one \d resolves a snapshot per configured dataset. → runbook
TraceLakePuffinReadAmplification consulted/fetched < 0.4 6h info The only alert whose remedy is a code change, not a config change — a standing review trigger, never a page. → runbook
TraceLakeIdxPruningIneffective pass-3 out/in > 0.9 1h warning The .idx pass is fetching a sidecar per candidate file and keeping over 90% of them. Break down by idx_declines_total{reason} before acting: only unreadable is a defect, the rest are workload, staleness, or a value cap. → runbook

Expression choices that look wrong and are not

The hit-ratio rule does not use tracelake_gateway_index_cache_hit_ratio. That gauge is a lifetime ratio; a pod that ran hot for a week hides a cold hour inside its own average, so no windowed alert can use it. The rule divides the two counters over a 30m window instead. On an idle gateway that is 0/0 → NaN, and a NaN comparison is false — silence on no traffic is intended, not a gap. The gauge remains useful on a dashboard, which is what it is for.

The manifest-cache rule alerts on the miss rate, not a hit ratio. The poller keeps every configured dataset warm, so steady state is ~0 misses and a ratio would sit pinned at 100% until it dipped for benign reasons. The 1h for: is load-bearing: every pod legitimately misses at boot, and again the first time a query reaches a window that the pod has not loaded, so a shorter window would fire on every rollout.

The sidecar-miss rule selects kind, it does not sum the family. The counter also carries kind="ndv", which is the planner estimating from Iceberg column stats instead of a distinct-value sketch — that reads no extra byte, so folding it into a read-amplification ratio would measure something the rule is not about, and would sit pinned above the threshold on every dataset that configures no ndvColumns. Hence {kind=~"puffin|idx"}: those two, and only those, mean the file is scanned.

0.4 on the Puffin rule is measured, not guessed. With one blob consulted out of N the ratio reads ≈ 1/N, and a measurement showed that the ranged-read path only models a win at N ≥ 3 (≈ 0.33), and then only at wide fan-out. 0.4 sits between the 3-column ratio and the 2-column one (0.5), which lands on the 20% margin — inside the error bar of the assumed RTT. The .idx is deliberately and permanently absent from this rule: 95.2% of that container is what a query already reads, leaving 4.8% to skip across 15 scattered ranges.

The pass-3 rule divides two counters that a declining pass never touches. The pass records neither leg when it declines wholesale, so a workload the index is not asked to serve leaves both series flat and the ratio undefined — silence, exactly as on the idle-gateway case above. Recording in == out for a pass that did not run would have made every such workload fire. The counters carry a pass label: divide them within one pass, and do not add them across passes.

Hot tier

These three rules are in the tracelake-hot-tier group. The Helm chart installs this group only when a dataset has a hotSource. The metrics that the rules read exist only for such datasets.

Alert Expression, in words for: Severity Meaning
TraceLakeColdTierLagNearBoundary an append commit is late (the commit age is more than one healthy rotation cycle) and rotated WAL files wait 1m critical No new append commit has come into the snapshot of this pod for longer than a healthy rotation cycle, while rotated data waits. The newest rows older than the boundary are in neither tier: Iceberg does not have them yet, and the hot source does not serve them. No query fails and no answer is marked. This is the hot-tier alert for a catalog outage. At the lowest boundarySeconds that boot accepts, the alert fires after the gap starts: approximately 45 s after when the WAL files rotate together, up to one rotation after when they do not. That is why for: is short. → runbook
TraceLakeHotTierDegraded > 5% of hot reads are unavailable or schema_drift, over 15m 15m warning Answers from Iceberg only do not have the newest boundarySeconds of data. A client that does not read the marker cannot see this. Answers that stop after they start are not complete. A query on the hot source only gets 503. The ratio includes the three types. A slow client can cause it when the hot source has no problem. → runbook
TraceLakeHotSourceSchemaDrift one or more hot reads are schema_drift, in the last 15m 1m warning Your table does not agree with the columns that the gateway examined at boot, or a value in it cannot be decoded. Queries that read that column get answers from Iceberg only, answers that are not complete, or (hot source only) 503. Your DBA must change the table back or correct the value. The alert stops 15 minutes after the last such read. If no query reads the column, the alert stops but the problem is still there. → runbook

The lag rule fires when an append is late, not at 0.8 × boundarySeconds. The gateway can see when the newest append committed, but not the event time of the rows. The ingestor appends only when a WAL file rotates: one time in each maxFileAgeMinutes at the default throughput. Thus the commit age increases to approximately 350 s between appends in a healthy deployment, which is more than 0.8 × the lowest boundary (412 s). A line below one rotation cycle would fire at each rotation. With its for:, the rule fires at a commit age of approximately 420 s. The cost: at the lowest boundary, the alert fires after the gap starts (approximately 45 s after, or up to one rotation after). It warns before the gap only when boundarySeconds is more than approximately 735 s at the defaults.

The lag rule also requires wal_ready_files > 0. A dataset that gets no data, or very little, also has a long time between appends, but no row is missing. Without this condition, the rule would fire on each quiet night. TraceLakeUploadBacklog uses the same metric, but with a 30m for:, which is too slow here.

This rule does not find all the stops. When no rotated file waits, it does not fire, even if T moves past rows that Iceberg does not have yet. Other alerts find these stops:

Stop Where the rows are The alert that finds it
Only the gateway cannot connect to the catalog (the ingestors continue to commit) committed, but not in the snapshot of this pod TraceLakeCatalogSnapshotStale
The consumer stopped (a broker or group problem) Kafka TraceLakeConsumerLagHigh
The WAL or the age check is stuck before rotation an active_* segment TraceLakeTaskWedged

A dataset with very little data can still cause this alert. For such a dataset, the commit age is already past the line. Thus the rule fires when one rotated file stays for three 30 s scrapes: when the time from rotation to commit is more than approximately 60 s. In a healthy deployment it is 45 s or less at the defaults. One slow upload or a commit that must retry can use the difference.

The degradation rule divides by hot_scans_total, not by gateway_query_requests_total. That metric counts HTTP requests only, so it does not include the PostgreSQL interface. Each hot read counts one time at most, so hot_scans_total is its own denominator. There is one bias: a check of the hot source that fails counts also when the read does not run (for example, an EXPLAIN), but a check that succeeds counts only when its read completes. Thus the ratio is slightly high. When there are no hot reads, the ratio is 0/0 and the rule does not fire.

A change to a column has its own rule. The gateway reads only the columns that a query uses. Thus a changed column degrades only the queries that read it. If these queries are less than 5% of hot reads, or if they occur for less than 15 minutes, the degradation rule does not fire. Each schema_drift read is a change in your database, so TraceLakeHotSourceSchemaDrift fires on one read. Its 15m window keeps it active for 15 minutes after the last read, thus its for: is short. The degradation rule also counts schema_drift. Thus a change to a column that many queries read fires the two rules.

Tail service

These three rules are in the tracelake-tail group. The Helm chart installs this group only when a dataset has hotSource.type: TAIL. Only the tail service has the metrics that they read.

Alert Expression, in words for: Severity Meaning
TraceLakeTailLagging a replica that has read to the end is more than the dataset's maxLagSeconds behind a partition 2m critical When the gateway reads this replica, the answer is from Iceberg only and marked. The replica also becomes not ready, so the gateway stops sending it queries. → runbook
TraceLakeTailCoverageShort a replica that has read to the end has no rows from before T = now − boundarySeconds 5m critical Each merged answer from this replica does not have the rows after T and is marked. Usually maxBytes is too small, or the topic keeps events for less than retentionSeconds + replaySlackSeconds. → runbook
TraceLakeTailWindowNotWhole a replica that has read to the end has less than retentionSeconds of rows 15m warning Merged answers are complete, but each query on the hot source only (<namespace>_hot, tier=hot) gets 503. → runbook

Each rule is for one replica, and only after its replay at start. The gateway examines each replica separately, so the rules keep the pod label. While a replica reads Kafka at start, its lag and its window are far past each line. That replica is not ready, so the gateway does not read it. tracelake_tail_replay_seconds becomes more than 0 when the replica has read to the end, and each rule requires that. A replica that does not become ready is the Helm chart's own rule, TraceLakeTailNotReady, which reads kube-state-metrics and is described in the runbook.

The two thresholds are metrics. maxLagSeconds and boundarySeconds can be different for each dataset, so the tail service sets them as metrics at start, and the rules compare against 0.

Maintenance and compaction

Alert Expression, in words for: Severity Meaning
TraceLakeCatalogCommitConflicts conflict rate > 0.05/s 30m warning Writers are serialising against each other. A conflict is a retry, not a loss — an occasional one is the design working. → runbook
TraceLakeCompactionBacklog ≥ 500 files in a partition 1h warning Rare by design. Sustained firing means the compactor fleet is undersized, not that the rule is noisy. → runbook
TraceLakeIndexBackfillNotDraining any data file with no .idx 36h warning Text predicates on the partition full-scan. Results stay correct (a missing sidecar is scanned, never skipped) — this is latency, not data loss. A non-zero reading between floor passes is normal, which is what the long for: absorbs. → runbook
TraceLakeIndexBackfillOutOfReach any TraceLake file with no .idx above 2 × targetSizeMb 36h warning The compactor never rewrites a file that large, so its .idx never comes back, and the alert above does not count it. Results stay correct. The compactor's own files are far below the limit, so the usual cause is a targetSizeMb lowered to less than half the size of files that also have no .idx (indexingColumns newly set, a lost upload, or an .idx rewrite). → runbook
TraceLakeCompactorRunsFailing any failed run in 3h 5m critical Compaction is the only hand-rolled Iceberg operation TraceLake owns. Treat a repeated failure as a correctness risk, not just a backlog one. → runbook
TraceLakeCompactorScrapeDown up == 0 15m critical The pod itself is gone — boot failure, OOM, eviction, node loss. A failed pass does not land here: the daemon stays up and reports through TraceLakeCompactorRunsFailing. While the pod is down nothing compacts, nothing expires, and no orphans are swept. → runbook
TraceLakeCompactorDeadlineExceeded any increase in 6h 5m warning A run passed runtimeDeadlineHours. The deadline is an alert threshold, not a cap — the run continues, competing with the next one. → runbook
TraceLakeCompactorEphemeralHigh a pass peaked > 80% of the /tmp volume's sizeLimit 5m warning The next merge of that size is an eviction taken mid-merge: the pass is discarded and the next one repeats it. Peak is the merge spill set plus the Tantivy scratch of the output being written, and on a text-heavy dataset the index term is the larger of the two (measured 11× the data it indexes). → runbook
TraceLakeCompactorNearCapacity compaction seconds per wall second, summed over datasets, > 0.7 over 3h 1h warning The compactor is busy more than 70% of the time. It compacts datasets one at a time, so this is the pass time divided by backlogCheckIntervalMinutes. At 1.0, passes run back to back and TraceLakeCompactionBacklog follows. The ratio does not depend on hardware. The window is 3h because a dataset's time is recorded only when it finishes, so a long pass arrives in one step. The nightly floor pass alone would need more than 2.1h to reach the line. → runbook
TraceLakeOrphanDeletionSpike > 1000 deletions in 1h 5m critical Orphan cleanup physically deletes objects and is the one maintenance path that can lose data. A normal sweep deletes a handful. → runbook
TraceLakeOrphanKeptRepeatedly orphan_keep_streak ≥ 2 5m warning Orphan cleanup reads each candidate again just before it deletes it, and keeps it if its ETag or last-modified time changed since the listing. An upload of new copies does that in one cleanup pass, however many files it uploaded. Two passes in a row mean the store's listing and HEAD disagree and cleanup deletes nothing. An uploaded object is too young to be a candidate in the next pass, so an upload cannot keep the same object twice. The count is kept in memory, so a compactor that restarts before two passes does not fire this. No data is lost. → runbook
TraceLakeBackgroundTaskDied a pod's task-exit counter is non-zero 5m critical A supervised loop panicked. It stays dead for the life of the pod — the supervisor reports, it does not restart — so the rule fires until that pod is replaced, not for a window after the death. Counts panics only: a deliberate abort and a clean return are teardown, so a rolling restart never fires this. → runbook
TraceLakeTaskWedged a wal_age_sweep, kafka_lag_refresh or gateway_snapshot_poll stamp is > 5 min stale 5m critical The other half of the above: the loop is alive but stuck and never panicked, so the exit counter stays flat. A wedged wal_age_sweep makes maxFileAgeMinutes untrue for every partition of that dataset, which rotates on size only; a wedged kafka_lag_refresh freezes consumer_lag so TraceLakeConsumerLagHigh cannot fire; a wedged gateway_snapshot_poll freezes catalog_snapshot_age_seconds so TraceLakeCatalogSnapshotStale cannot fire either. Total wedge age at page time is threshold + for: = 10 min, which is what the annotation says. → runbook
TraceLakeMaintenanceTaskWedged a snapshot_expiry or orphan_cleanup stamp is > 3 h stale 15m critical Same signal at the maintenance cadence, which is three orders of magnitude longer and cannot share a threshold. Neither loop has any other signal behind a wedge. → runbook

TraceLakeCompactorScrapeDown reads up{tracelake_component="compactor"}; see Deployment labels. Note that the compactor binds its metrics endpoint before connecting the catalog, precisely so an unreachable catalog still scrapes rather than surfacing here as a dead pod. Manually scoped recovery runs (ingestor compact --dataset/--partition/--orphan-dry-run/--retention-dry-run) do not serve metrics at all — they are one-shot and exit — so no rule covers them.

TraceLakeBackgroundTaskDied is filed here because the two loops it exists for are snapshot_expiry and orphan_cleanup — two of the four with no consequence alert behind them (nothing alerts on snapshots_expired_total being flat, and the orphan rule catches too many deletions, never zero); wal_age_sweep and sigterm_handler are the other two. It covers the remaining nine too, where it fires earlier and names the dead task rather than the symptom: today a dead upload_scan surfaces as TraceLakeUploadBacklog and a dead gateway_snapshot_poll as a rising catalog_snapshot_age_seconds. task is the loop name, not the dataset — see the metrics page.

It reads the raw counter, not an increase() window, and is deliberately not aggregated. The condition is "this pod is running with a dead loop", which persists until the pod is replaced; any window would resolve the alert with the loop still gone, which is the silence the rule exists to remove. The counter resets on process restart, so the replacement pod clears it. Per-series because the remedy is to delete one named pod — sum by (task) would drop the label that names it.

It covers every long-lived loop in the fleet: ten async tasks and the ingestor's three WAL threads (wal_drain, wal_age_sweep, wal_backpressure). Two of the loops had no alert of any kind behind them: wal_age_sweep is the only thing that rotates a WAL file on age, for busy and idle partitions, and a dead sigterm_handler leaves the pod ignoring SIGTERM until the kubelet's SIGKILL, which nothing observes until the next rollout.

Routing caveat: every task carries subsystem: maintenance, so an Alertmanager route keyed on subsystem sends kafka_poll, kafka_lag_refresh, batched_commit, upload_scan, gateway_snapshot_poll, wal_drain, wal_age_sweep, wal_backpressure and sigterm_handler to the maintenance owner — ingestion and pod-lifecycle failures included. The task label tells the human what actually died; it does not steer the router.

TraceLakeTaskWedged and TraceLakeMaintenanceTaskWedged are the other half of that counter, and they take the same routing caveat. Neither reads task_exits_total — a wedged loop never panicked, so nothing increments and the death rule is silent by construction. They read tracelake_task_last_pass_timestamp_seconds, which only five of the seventeen loops carry: wal_age_sweep, kafka_lag_refresh, gateway_snapshot_poll, snapshot_expiry and orphan_cleanup. The others are omitted deliberately — the event-driven ones, where a stale stamp is a healthy idle pod rather than a fault, and the ones that already have a consequence that shows behind a wedge (the tail service's two among them: a wedge shows as rising tracelake_tail_lag_seconds). The test that sorts them: is the gauge the consequence alert reads written outside the loop that would wedge? gateway_snapshot_poll is stamped because it fails that test — the poll republishes catalog_snapshot_age_seconds at the end of its own pass, so a wedge freezes that gauge rather than letting it rise, and the gauge starts at 0, so a poller wedged from boot publishes a healthy 0 forever.

Two rules rather than one because the five loops fall into two cadences three orders of magnitude apart: 30s/15s loops against 60-minute maintenance loops. A single threshold either pages on every normal maintenance gap or takes hours to notice a wedged sweeper. They share one runbook anchor, because the remedy — replace the pod — does not differ.

TLS certificates

This rule is in each bundle. Without TLS, it does not fire: only a listener with TLS (the tail service with tail.tls, the gateway with queryGateway.postgres) has the metrics that it reads.

Alert Expression, in words for: Severity Meaning
TraceLakeTlsCertificateExpiring the certificate in use has less than 0.2 of its lifetime (notBefore to notAfter) remaining 1h warning Each 60 s, each listener compares its files with the certificate that it uses, and loads changed files. Thus a certificate this old did not get a renewal, or the new files are not correct (WARN TLS certificate files do not load). When it expires, each connection fails: on the tail service (only TraceLakeHotTierDegraded fires, because the tail service stays ready) or on the PostgreSQL port. → runbook

A fraction, not a number of days. Some certificates are valid for some hours, and some for one year. One number of days fires all the time for the first, or too late for the second. By default, cert-manager renews a certificate when 1/3 of its lifetime remains, so 0.2 is after that point for each lifetime: 18 days of a 90-day certificate, 4.8 hours of a 24-hour certificate. After the certificate expires, the fraction is less than 0, and the rule fires. No TraceLake configuration key changes this threshold.

Series that may legitimately be absent

These families can be missing from a scrape entirely. Every rule that touches them alerts on > threshold, so absence and zero mean the same thing and no absent() guard is required — but a rule added later must not read absence as a value.

  • The four pg_* families register only when queryGateway.postgres is configured. A gateway without the second door exposes none of them.
  • The two tracelake_tls_certificate_* families exist only on a listener with TLS: the tail service with tail.tls, the gateway with queryGateway.postgres. Without them, TraceLakeTlsCertificateExpiring cannot fire, which is correct.
  • The five hot_* and cold_tier_lag* families register only when a dataset has a hotSource, and have series only for such datasets. cold_tier_lag_seconds is also absent for a dataset until the pod has a snapshot with a commit. A value of 0 would show a healthy dataset during an outage, and a pod with no snapshot answers 503 in an outage. Absent means "not known yet", not "no lag".
  • tracelake_catalog_commit_conflicts_total is never seeded: its dataset label is unknown at registration, so it appears only once a conflict has actually happened.
  • tracelake_compactor_sidecar_bytes is deliberately not seeded either, and unlike the two above it can be absent on a healthy deployment: .idx and Puffin sidecars are written at compaction only, so the family has no series until a pass writes an object, and a manually scoped run (--dataset / --partition / --orphan-dry-run / --retention-dry-run) registers the collector without ever serving /metrics. A pre-seeded histogram would publish a zero-byte ratio, which reads as a fact rather than as silence. No rule in this bundle reads it — it is a capacity signal on the compactor dashboard row, and that row being empty between runs is expected.
  • tracelake_ingestor_consumer_lag, per dataset/partition. It is not seeded, and unlike the three above it is also removed: the refresh loop publishes exactly the partitions it obtained a reading for and drops the rest. A missing partition means no reading was obtained — a committed() timeout, a fetch_watermarks failure, a blocking-pool stall, a partition revoked to another pod, a pod with no assignment at all, or a partition that has not committed an offset yet (routine for the first minutes after a pod joins) — and never lag zero. That is what TraceLakeConsumerLagHigh is meant to see: the previous behaviour held the last healthy value through an outage, which read as fine and suppressed the alert. Note the flip side: an intermittently failing lookup flaps the series and each gap resets for: 30m.