Repository navigation
feat(processor): report duplicate events as dedup/filtered metrics - #7280
Merged
Merged
Conversation
Contributor
Author
|
Stack (merge bottom-up)
|
mihir20
marked this pull request as draft
August 17, 2026 10:40
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7280 +/- ##
==========================================
- Coverage 79.67% 79.64% -0.04%
==========================================
Files 601 601
Lines 67192 67217 +25
==========================================
- Hits 53535 53534 -1
- Misses 10490 10522 +32
+ Partials 3167 3161 -6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
mihir20
marked this pull request as ready for review
August 17, 2026 11:29
mihir20
requested review from
atzoum and
itsmihir
and removed request for
atzoum
August 17, 2026 11:29
1 task done
ktgowtham
self-requested a review
August 18, 2026 11:04
atzoum
approved these changes
Aug 18, 2026
| proc.config.mirrorFilterCacheTTL = proc.conf.GetDurationVar(3, time.Hour, "Processor.userTransformationMirroring.filterCacheTTL") | ||
| proc.config.userTransformationMirroringBlockedIDs = proc.conf.GetReloadableStringSliceVar(nil, "Processor.userTransformationMirroring.blockedTransformationIDs") | ||
| proc.config.storeSamplerEnabled = proc.conf.GetReloadableBoolVar(false, "Processor.storeSamplerEnabled") | ||
| proc.config.dedupMetricsEnabled = proc.conf.GetReloadableBoolVar(false, "Reporting.dedupMetrics.enabled") |
Contributor
There was a problem hiding this comment.
Suggested change
| proc.config.dedupMetricsEnabled = proc.conf.GetReloadableBoolVar(false, "Reporting.dedupMetrics.enabled") | |
| proc.config.reportingDedupMetricsEnabled = proc.conf.GetReloadableBoolVar(false, "Reporting.dedupMetrics.enabled") |
itsmihir
approved these changes
Aug 19, 2026
Duplicate events dropped by dedup were invisible to reporting: only the
processor_write_key_duplicate_events prometheus counter recorded them.
Emit a filtered/298 report row under a new standalone DEDUP side-PU
(CreatePUDetails("", DEDUP, false, false), like BOT_MANAGEMENT and
EVENT_BLOCKING) at the duplicate-drop point in the preprocess loop,
gated by reporting being enabled plus the new reloadable flag
Reporting.dedupMetrics.enabled (default false).
The drop itself, the prometheus counter, and the GATEWAY billing metric
are unchanged; with the flag off every report row is identical to today.
Co-Authored-By: Claude Fable 5 <[email protected]>
🔒 Scanned for secrets using gitleaks 8.28.0
Extend TestReportingDroppedEvents with a dedup-stage subtest: with Dedup.enableDedup and Reporting.dedupMetrics.enabled on, sending one event plus two duplicates yields a dedup/filtered/298 row with count 2 (empty in_pu, non-terminal, non-initial) in the reports table, while the gateway PU counts only the surviving event. runRudderServer gains a variadic config-overrides parameter; existing subtests are unchanged. Co-Authored-By: Claude Fable 5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.28.0
mihir20
force-pushed
the
pipeline-inspector/01-dedup-metrics
branch
from
August 19, 2026 10:57
17bcee0 to
5445674
Compare
…icsEnabled Aligns the field name with its Reporting.dedupMetrics.enabled config key, as suggested in review. Co-Authored-By: Claude Fable 5 <[email protected]> 🔒 Scanned for secrets using gitleaks 8.28.0
This was referenced Aug 24, 2026
Merged
itsmihir
pushed a commit
that referenced
this pull request
Aug 24, 2026
🤖 I have created a release *beep* *boop* --- ## [1.84.0-rc.1](v1.83.0...v1.84.0-rc.1) (2026-08-24) ### Features * add AGENTS.md for agent management and reference ([#7290](#7290)) ([2d28b32](2d28b32)) * **processor:** report duplicate events as dedup/filtered metrics ([#7280](#7280)) ([f2655fb](f2655fb)) * **warehouse:** add clickhouse driver interface ([#7296](#7296)) ([239d9a4](239d9a4)) ### Bug Fixes * **processor:** proc destination hydration omitted destination's original id ([#7297](#7297)) ([f389df4](f389df4)) * **warehouse:** close load file descriptor in identity uploadFile ([#7186](#7186)) ([bfd8bc9](bfd8bc9)) ### Miscellaneous * handle oversized reporting payloads ([#7293](#7293)) ([7a83281](7a83281)) * pyt security hardening ([#7272](#7272)) ([e13b731](e13b731)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
itsmihir
pushed a commit
that referenced
this pull request
Aug 25, 2026
🤖 I have created a release *beep* *boop* --- ## [1.84.0](v1.83.0...v1.84.0) (2026-08-24) ### Features * add AGENTS.md for agent management and reference ([#7290](#7290)) ([2d28b32](2d28b32)) * **processor:** report duplicate events as dedup/filtered metrics ([#7280](#7280)) ([f2655fb](f2655fb)) * **warehouse:** add clickhouse driver interface ([#7296](#7296)) ([239d9a4](239d9a4)) ### Bug Fixes * **processor:** proc destination hydration omitted destination's original id ([#7297](#7297)) ([f389df4](f389df4)) * **warehouse:** close load file descriptor in identity uploadFile ([#7186](#7186)) ([bfd8bc9](bfd8bc9)) ### Miscellaneous * handle oversized reporting payloads ([#7293](#7293)) ([7a83281](7a83281)) * pyt security hardening ([#7272](#7272)) ([e13b731](e13b731)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
First slice of the Pipeline Inspector work (extending the existing reporting counters so per-stage drops become visible to customers).
Duplicate events dropped by dedup are currently invisible to reporting: the only trace is the
processor_write_key_duplicate_eventsprometheus counter, so events "go missing" between the gateway and downstream stages with no report row explaining why.This PR gives duplicates a report row:
DEDUP = "dedup"inutils/types/reporting_types.go.Reporting.dedupMetrics.enabled(default false), registered once inloadReloadableConfigand read via.Load()at the emission site.proc.isReportingEnabled() && proc.config.dedupMetricsEnabled.Load(), afiltered/298 row is accumulated into a newdedupStatusDetailsMap(same mutate/reset pattern as the adjacent bot-management and event-blocking blocks).pretransformStagewithCreatePUDetails("", DEDUP, false, false)— a standalone side-PU exactly likeBOT_MANAGEMENT/EVENT_BLOCKING:reportedBy=dedup,state=filtered,status_code=298, emptyin_reported_by, terminal=false, initial=false. Rows ride the existing storeStage reporting transaction; no reporting-plumbing changes.srcHydrationMessage→preTransformationMessagewith anAssertKeysSubsetcheck, following the existing status-detail-map pattern.Unchanged: the drop itself, the prometheus counter (increments identically with the flag on or off), and billing — duplicates still never reach the GATEWAY metric, so this is purely additive. With the flag off (default), every report row is identical to today.
The reporting service ingests the new
deduprows with no changes: there is no reportedBy allowlist on the write path, and non-canonical states keep their value in thecountcolumn, contributing 0 to existing success/abort/fail sums.Tests
Unit: new
TestDedupReportinginprocessor/processor_test.go(6 subtests): exactly one dedup filtered/298 row per drop with the correct PU shape, no GATEWAY row for the deduped twin, no row with the flag off or with reporting disabled, identical duplicate-counter behaviour in both flag states, and aggregation of N duplicates into a single row with count N.Integration: new "Events dropped in dedup stage" subtest in
TestReportingDroppedEvents(integration_test/reporting_dropped_events): boots the full server with dedup and the metrics flag on, sends 1 event + 2 duplicates, and asserts thereportstable gets adedup/filtered/298 row with count 2 (emptyin_pu, non-terminal, non-initial) while the gateway PU counts only the surviving event.runRudderServergained a variadic config-overrides parameter; existing subtests are unchanged.Linear Ticket
pipe-3285
Security