feat(inbound-filters): Generate Relay rules from custom inbound filters#119816
Draft
shellmayr wants to merge 3 commits into
Draft
feat(inbound-filters): Generate Relay rules from custom inbound filters#119816shellmayr wants to merge 3 commits into
shellmayr wants to merge 3 commits into
Conversation
Translate active CustomInboundFilter rows into Relay generic inbound filters in the project config, gated behind organizations:inbound-filters-v2. Conditions within a filter are combined with AND; release conditions target the release field of the filter's data category (events, logs, or trace metrics). Filter mutations now schedule a project config invalidation so changes propagate without waiting for the cache TTL.
One test case per filter shape via pytest.param instead of a separate test function each.
Replace the release-only field constant and per-type branching with a target item type enum and a per-target map of condition type to field path (or condition builder), so new condition types and targets are table entries instead of new code paths.
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.
CustomInboundFilterrows into Relay generic inbound filters during project config generation, gated behindorganizations:inbound-filters-v2(nested inside the existingprojects:custom-inbound-filterscheck, matching the API endpoints)releaseconditions glob against the release field of the filter's data category:event.releasefor error and release-only filters (mirroring the legacy releases filter),log.attributes.sentry.release.valuefor log filters,trace_metric.attributes.sentry.release.valuefor trace metric filterserror_messageconditions match exception type, exception value, andlogentry.formatted— the legacy"{type}: {value}"concatenation is not expressible in Relay's rule DSLCustomInboundFilterConditionTypeinto the model module so ingest code doesn't import from the API layeractive/conditionschangesentry_relay.processing.validate_rule_conditionCloses TET-2703