Skip to content

feat(occurrences on eap): Implement the type attribute for filtering error/issue platform events#108099

Merged
shashjar merged 1 commit intomasterfrom
add-eap-type-attribute-on-occurrences-for-filtering
Feb 12, 2026
Merged

feat(occurrences on eap): Implement the type attribute for filtering error/issue platform events#108099
shashjar merged 1 commit intomasterfrom
add-eap-type-attribute-on-occurrences-for-filtering

Conversation

@shashjar
Copy link
Member

Adds a type attribute to the EAP occurrence definitions, making it queryable via the search resolver. The OccurrenceCategory enum provides an API in the Occurrences RPC class for consumers to filter their queries down to either error events (error) or issue platform events (generic). The default behavior will continue to be querying all occurrence trace items as a whole.

Applies OccurrenceCategory.ERROR as the filter to all existing EAP callsites where we want to query errors only.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 12, 2026
return results

@classmethod
def _build_category_filter(cls, category: OccurrenceCategory | None) -> TraceItemFilter | None:
Copy link
Member Author

Choose a reason for hiding this comment

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

OccurrenceCategory.ERROR --> filter is type != "generic"
OccurrenceCategory.GENERIC --> filter is type == "generic"

This is to be on the safer side since (I believe) "generic" is the only possible event type value for issue platform events, while there are several possible type values for error events. However - we are forwarding only events with type = "error" or type = "generic" to EAP (eventstream code), so either way should work as expected.

@shashjar shashjar requested a review from a team February 12, 2026 01:44
@shashjar shashjar marked this pull request as ready for review February 12, 2026 01:44
@shashjar shashjar requested review from a team as code owners February 12, 2026 01:44
@shashjar shashjar requested review from thetruecpaul and removed request for a team February 12, 2026 01:45
@shashjar
Copy link
Member Author

bugbot review

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Copy link
Contributor

@thetruecpaul thetruecpaul left a comment

Choose a reason for hiding this comment

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

LGTM!

@shashjar shashjar merged commit 466280b into master Feb 12, 2026
75 checks passed
@shashjar shashjar deleted the add-eap-type-attribute-on-occurrences-for-filtering branch February 12, 2026 17:32
jaydgoss pushed a commit that referenced this pull request Feb 12, 2026
…g error/issue platform events (#108099)

Adds a `type` attribute to the EAP occurrence definitions, making it
queryable via the search resolver. The `OccurrenceCategory` enum
provides an API in the `Occurrences` RPC class for consumers to filter
their queries down to either error events (`error`) or issue platform
events (`generic`). The default behavior will continue to be querying
all occurrence trace items as a whole.

Applies `OccurrenceCategory.ERROR` as the filter to all existing EAP
callsites where we want to query errors only.
DominikB2014 pushed a commit that referenced this pull request Feb 13, 2026
…g error/issue platform events (#108099)

Adds a `type` attribute to the EAP occurrence definitions, making it
queryable via the search resolver. The `OccurrenceCategory` enum
provides an API in the `Occurrences` RPC class for consumers to filter
their queries down to either error events (`error`) or issue platform
events (`generic`). The default behavior will continue to be querying
all occurrence trace items as a whole.

Applies `OccurrenceCategory.ERROR` as the filter to all existing EAP
callsites where we want to query errors only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants