Reindex path feeds error events to consumer, bypassing filtering
Opened by stack72 · 4/9/2026· GitHub #237
Summary
The /v1/stats/reindex endpoint reads raw events from Athena/S3 and rebuilds metrics using buildEventCounts(). This path bypasses StatsConsumer.publish() entirely, so any filtering applied in the consumer (e.g., skipping error events per #235) is not applied during reindex.
Problem
If a reindex is triggered (including bulk reindex?all), buildEventCounts() processes all raw events — including those with result.status: "error" — and overwrites the user_metrics/username_metrics docs. This can reintroduce data that was cleaned up or filtered out by the consumer.
Expected Behavior
The reindex path should not give error events to the consumer. Error events should be filtered before they reach buildEventCounts(), consistent with the real-time ingestion path.
Related
- #235 — consumer-side fix for filtering error events in the real-time path
Affected Code
services/telemetry/lib/server.ts—buildEventCounts(),reindexByDistinctId(),reindexByUsername(),bootstrapFromS3(),bootstrapByUsername()
Open
No activity in this phase yet.
Sign in to post a ripple.