Skip to content

feat(processor): report event_filter drops per reason and stop its succeeded rows - #7454

Merged
mihir20 merged 1 commit into
masterfrom
pipeline-inspector-gaps/05-event-filter-reason-statuses
Oct 14, 2026
Merged

mihir20 merged 1 commit into
masterfrom
pipeline-inspector-gaps/05-event-filter-reason-statuses

Conversation

@mihir20

@mihir20 mihir20 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

event_filter reports today one succeeded row per surviving event, one filtered/298 row per dropped event with the reason only in the sample response, and aborted rows for drains and malformed input. The succeeded row double-counts the node's throughput, which is already measured by user_transformer before it and dest_transformer after it, and a single 298 hides why an event was dropped.

Behind Reporting.eventFilterReasonMetrics.enabled (default false), event_filter stops emitting succeeded rows and its filtered rows carry one status code per reason, still under the same PU and the same filtered state:

status code reason
291 message type not supported by the destination
292 message event name not supported by the destination
293 excluded by the hybrid-mode cloud events filter

The code is set on the report rows only. The transformer responses, the dropped-job parameters and the gateway statuses keep 298, so the aborted-versus-filtered split, proc_error routing and everything that decides which events reach the destination transformer are unchanged. aborted rows (drain/410, invalid message type/400, invalid message event/400) are unchanged. The reason strings are exported constants in processor/eventfilter, mapped to codes by one pure function with 298 as the fallback. With the flag off the rows are exactly today's.

Keeping the filtered state means the reporting service's existing event_filter filtered-events query keeps working without a coordinated change.

Linear Ticket

PIPE-3455

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.77419% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.53%. Comparing base (5fa5fe2) to head (e4be4e5).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
processor/processor.go 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7454      +/-   ##
==========================================
- Coverage   84.58%   84.53%   -0.05%     
==========================================
  Files         625      632       +7     
  Lines       62514    62871     +357     
==========================================
+ Hits        52877    53148     +271     
- Misses       9634     9720      +86     
  Partials        3        3              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/04-dest-transformer-diff-metrics branch from b4f31c7 to 88be095 Compare October 7, 2026 09:14
@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/05-event-filter-reason-statuses branch from 046b6f3 to 643c426 Compare October 7, 2026 09:14
@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/04-dest-transformer-diff-metrics branch from 88be095 to 8e14d5e Compare October 7, 2026 09:39
@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/05-event-filter-reason-statuses branch from 643c426 to 4ff0fd9 Compare October 7, 2026 09:39
@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/04-dest-transformer-diff-metrics branch from 8e14d5e to 64c39af Compare October 7, 2026 11:21
@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/05-event-filter-reason-statuses branch from 4ff0fd9 to e38ca4d Compare October 7, 2026 11:21
@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/04-dest-transformer-diff-metrics branch from 64c39af to ad5275d Compare October 7, 2026 12:12
@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/05-event-filter-reason-statuses branch from e38ca4d to 5c33af8 Compare October 7, 2026 12:13
@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/04-dest-transformer-diff-metrics branch from ad5275d to 9d65563 Compare October 7, 2026 16:23
@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/05-event-filter-reason-statuses branch from 5c33af8 to 6281a70 Compare October 7, 2026 16:23
@mihir20
mihir20 requested review from atzoum and itsmihir October 8, 2026 08:27
Comment thread utils/types/reporting_types.go Resolved
Comment thread processor/processor.go Resolved
Comment thread processor/processor.go Resolved
Base automatically changed from pipeline-inspector-gaps/04-dest-transformer-diff-metrics to master October 8, 2026 14:07
@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/05-event-filter-reason-statuses branch from 6281a70 to f50e948 Compare October 12, 2026 09:10
@mihir20
mihir20 requested a review from atzoum October 12, 2026 09:37
@ktgowtham
ktgowtham self-requested a review October 12, 2026 11:03
Comment thread processor/processor.go Outdated
commonMetaData *types.Metadata,
eventsByMessageID map[string]types.SingularEventWithReceivedAt,
inPU, pu string,
reportStatusCode func(types.TransformerResponse) int,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
reportStatusCode func(types.TransformerResponse) int,
filteredReportStatusCode func(types.TransformerResponse) int,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, renamed to filteredReportStatusCode.

Comment thread processor/processor.go Outdated
eventFilterReasonMetrics := proc.config.reportingEventFilterReasonEnabled.Load()
reportStatusCode := responseStatusCode
if eventFilterReasonMetrics {
reportStatusCode = func(r types.TransformerResponse) int { return eventfilter.FilteredCodeForReason(r.Error) }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional: for hardening in case someone tries to use this function for the non-filtered group

Suggested change
reportStatusCode = func(r types.TransformerResponse) int { return eventfilter.FilteredCodeForReason(r.Error) }
reportStatusCode = func(r types.TransformerResponse) int {
if r.StatusCode != reportingtypes.FilterEventCode {
return r.StatusCode
}
return eventfilter.FilteredCodeForReason(r.Error)
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, applied the guard. A non-298 response now keeps its own status code and only the 298 group goes through the reason mapping.

…ts succeeded rows

The event filter reported one succeeded row per surviving event, one
filtered/298 row per dropped event with the reason only in the sample
response, and aborted rows for drains and malformed input. The succeeded
row double-counts the node's throughput, which user_transformer measures
before it and dest_transformer after it, and a single 298 hides why an event
was dropped.

Behind Reporting.eventFilterReasonMetrics.enabled (default false), the
event filter stops emitting succeeded rows and its filtered report rows
carry one status code per reason, still under the filtered state: 291 for
an unsupported message type, 292 for an unsupported event name, 293 for the
hybrid-mode filter. The codes are set on the report rows only; the
transformer responses, dropped-job parameters and gateway statuses keep
298, so the aborted/filtered split and routing are unchanged. The reason
strings are exported constants in processor/eventfilter, mapped to codes by
one pure function. Callers of getNonSuccessfulMetrics now supply the
report status-code mapper and the metrics builder takes its stats counter
from the caller instead of deriving it from the state string. shouldReport
treats the three codes like 298.

Keeping the filtered state means the reporting service's existing
event_filter filtered-events query keeps working unchanged.

Co-Authored-By: Claude Fable 5.1 <[email protected]>

🔒 Scanned for secrets using gitleaks 8.28.0
@mihir20
mihir20 force-pushed the pipeline-inspector-gaps/05-event-filter-reason-statuses branch from f50e948 to e4be4e5 Compare October 14, 2026 06:06
@mihir20
mihir20 enabled auto-merge (squash) October 14, 2026 06:11
@mihir20
mihir20 merged commit 5caff53 into master Oct 14, 2026
70 checks passed
@mihir20
mihir20 deleted the pipeline-inspector-gaps/05-event-filter-reason-statuses branch October 14, 2026 06:39
This was referenced Oct 19, 2026
mihir20 pushed a commit that referenced this pull request Oct 19, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.91.0-rc.1](v1.90.0...v1.91.0-rc.1)
(2026-10-19)


### Features

* **jobsdb:** pending events gauge for the gw jobsdb
([#7447](#7447))
([fc539c4](fc539c4))
* **processor:** report event_filter drops per reason and stop its
succeeded rows
([#7454](#7454))
([5caff53](5caff53))


### Bug Fixes

* **processor:** exclude dropped jobs from tracked users and activation
records
([#7485](#7485))
([526602c](526602c))
* **router:** report destination status for v1 proxy deliveries in
transformer_outgoing_request_count
([#7482](#7482))
([bba1c21](bba1c21))


### Miscellaneous

* bump sqlconnect-go to v1.34.0
([#7479](#7479))
([71e8cfa](71e8cfa))
* stop setting in_reported_by on report rows
([#7458](#7458))
([814d149](814d149))
* sync release v1.90.0 to main branch
([#7475](#7475))
([d05fcbb](d05fcbb))
* **tooling:** move rudder-server test MinIO to Silo
([#7469](#7469))
([935bf59](935bf59))

---
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 was referenced Oct 20, 2026
itsmihir pushed a commit that referenced this pull request Oct 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.91.0-rc.2](v1.90.0...v1.91.0-rc.2)
(2026-10-20)


### Features

* **jobsdb:** pending events gauge for the gw jobsdb
([#7447](#7447))
([fc539c4](fc539c4))
* **processor:** report event_filter drops per reason and stop its
succeeded rows
([#7454](#7454))
([5caff53](5caff53))


### Bug Fixes

* **destination:** authenticate marketo bulk uploads with bearer token
([#7510](#7510))
([3eaffad](3eaffad))
* **processor:** exclude dropped jobs from tracked users and activation
records
([#7485](#7485))
([526602c](526602c))
* **router:** enable live events payload masking by default
([#7500](#7500))
([8b5c22d](8b5c22d))
* **router:** mask multi-request delivery payloads
([#7476](#7476))
([f65572e](f65572e))
* **router:** mask reporting sample event secrets
([#7497](#7497))
([833d694](833d694))
* **router:** report destination status for v1 proxy deliveries in
transformer_outgoing_request_count
([#7482](#7482))
([bba1c21](bba1c21))


### Miscellaneous

* bump sqlconnect-go to v1.34.0
([#7479](#7479))
([71e8cfa](71e8cfa))
* stop setting in_reported_by on report rows
([#7458](#7458))
([814d149](814d149))
* sync release v1.90.0 to main branch
([#7475](#7475))
([d05fcbb](d05fcbb))
* **tooling:** move rudder-server test MinIO to Silo
([#7469](#7469))
([935bf59](935bf59))

---
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 Oct 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.91.0](v1.90.0...v1.91.0)
(2026-10-20)


### Features

* **jobsdb:** pending events gauge for the gw jobsdb
([#7447](#7447))
([fc539c4](fc539c4))
* **processor:** report event_filter drops per reason and stop its
succeeded rows
([#7454](#7454))
([5caff53](5caff53))


### Bug Fixes

* **destination:** authenticate marketo bulk uploads with bearer token
([#7510](#7510))
([3eaffad](3eaffad))
* **processor:** exclude dropped jobs from tracked users and activation
records
([#7485](#7485))
([526602c](526602c))
* **router:** enable live events payload masking by default
([#7500](#7500))
([8b5c22d](8b5c22d))
* **router:** mask multi-request delivery payloads
([#7476](#7476))
([f65572e](f65572e))
* **router:** mask reporting sample event secrets
([#7497](#7497))
([833d694](833d694))
* **router:** report destination status for v1 proxy deliveries in
transformer_outgoing_request_count
([#7482](#7482))
([bba1c21](bba1c21))


### Miscellaneous

* bump sqlconnect-go to v1.34.0
([#7479](#7479))
([71e8cfa](71e8cfa))
* stop setting in_reported_by on report rows
([#7458](#7458))
([814d149](814d149))
* sync release v1.90.0 to main branch
([#7475](#7475))
([d05fcbb](d05fcbb))
* **tooling:** move rudder-server test MinIO to Silo
([#7469](#7469))
([935bf59](935bf59))

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants