Skip to main content
← Back to list
01Issue
FeatureOpenSwamp Club
AssigneesNone

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.

  • #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 PROGRESSSHIPPED

Open

4/9/2026, 4:43:56 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.