Skip to main content
← Back to list
01Issue
BugShippedSwamp Club
Assigneesstack72

Reindex path feeds error events to consumer, bypassing filtering

Opened by stack72 · 4/9/2026· Shipped 4/11/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.

  • #235 — consumer-side fix for filtering error events in the real-time path

Affected Code

  • services/telemetry/lib/server.tsbuildEventCounts(), reindexByDistinctId(), reindexByUsername(), bootstrapFromS3(), bootstrapByUsername()
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPEDTRIAGE+ 13 MOREREVIEW+ 3 MOREPR_MERGEDSHIPPED

Shipped

4/11/2026, 9:58:10 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack724/11/2026, 8:24:29 PM

Sign in to post a ripple.