:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(ai-research): name the shared ml consumer alerts in the fetch notes (#116053)
Robbiea4bcdfab87d0
diff --git a/nodejs/src/ingestion/pipelines/sessionreplay/ml-mirror-image-fetch/IMPLEMENTATION_NOTES.md b/nodejs/src/ingestion/pipelines/sessionreplay/ml-mirror-image-fetch/IMPLEMENTATION_NOTES.mdindex 817b20576f16..059c23172634 100644--- a/nodejs/src/ingestion/pipelines/sessionreplay/ml-mirror-image-fetch/IMPLEMENTATION_NOTES.md+++ b/nodejs/src/ingestion/pipelines/sessionreplay/ml-mirror-image-fetch/IMPLEMENTATION_NOTES.md@@ -119,7 +119,8 @@ The lane uses bounded labels for all signals. The dashboards group failures by a| ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || The 40-second pass budget is too short. | `ml_image_fetch_republished_total{reason="pass_deadline"}` divided by completed URLs plus all republishes | Fetch dashboard: **Pass deadline deferral rate**. | Check the completion age first. A high share is expected when a registrable domain has more queued URLs than its concurrency limit can serve in one pass. One pod owns each registrable domain, so more pods do not drain that domain faster. Increase the pass budget only if active batch age keeps enough margin below Kafka's 300-second poll limit. || A fetch batch approaches Kafka's 300-second poll limit. | Active batch age exceeds 180 seconds. Completed batch duration shows the recent distribution. | Fetch dashboard: **Poll batch duration**. Alert: `IngestionSessionReplayImageFetchBatchNearPollLimit`. | Check store latency and request scheduling. Scale the lane before changing the pass budget. |-| The fetch lane cannot drain its frontier topic. | Frontier lag exceeds 1,000 records and stays flat or projects more than 10% growth in one hour. | Fetch dashboard: Kafka lag and drain time. Alert: `IngestionSessionReplayImageFetchNotDraining`. | Check consumer members, pod capacity, request waits, and deadline deferrals. |+| The fetch lane cannot drain its frontier topic. | The frontier backlog exceeds 30 minutes of input, and a one-hour projection stays above that limit. The backlog is the lag divided by the input rate of the topic. | Fetch dashboard: Kafka lag and drain time. Alert: `IngestionSessionReplayMlConsumerNotDraining`, which covers all four ML replay lanes. | Check consumer members, pod capacity, request waits, and deadline deferrals. |+| The fetch consumer stops committing frontier offsets. | The consumer commits no frontier offset for 30 minutes while the frontier has lag. This also detects a stall when the input stops. | Alert: `IngestionSessionReplayMlConsumerStalled`, which covers all four ML replay lanes. | Check consumer members, pod restarts, and the active batch age. || URLs reach a terminal outcome long after capture. | More than 5% of the URLs that completed during the last hour were captured more than six hours before, for one hour. `ml_image_fetch_completed_url_system_time_seconds` gives the distribution. | Fetch dashboard: **URL age and completion time**. Alert: `IngestionSessionReplayImageFetchCompletionDelayed`. | Check frontier lag, consumer members, pod CPU throttling, and request outcomes. || DynamoDB is slow, or a DynamoDB or Kafka request fails. | Crawl-history duration by operation and outcome, a store error, a republish failure, or a failed retry release. A durable consumer-loop error log covers a pod that exits before a metrics scrape. | Fetch dashboard: **Store health and delivery failures**. Loki alert: `IngestionSessionReplayImageFetchConsumerLoopFailed`. | Check the failed or slow operation. Do not discard or manually commit the affected offsets. || Kafka republishing consumes a large part of the poll interval. | Total republish flush duration and per-topic delivery time increase. Records and registrable-domain keys per topic show whether the cause is volume, redirect fan-out, or delivery latency. A finalization-deadline counter records batches that stop before all records start. | Fetch dashboard: **Republish messages and registrable domains per batch**, **Republish batch duration**, **Store health and delivery failures**, and **Poll batch duration**. | Check Kafka producer latency and target-domain fan-out. Keep the active batch below Kafka's poll limit. |