Skip to content

feat(occurrences on eap): Implement performance issues query for organization events tracing#110723

Merged
shashjar merged 18 commits intomasterfrom
shashjar/organization-events-tracing-load-performance-issues-eap-query
Mar 19, 2026
Merged

feat(occurrences on eap): Implement performance issues query for organization events tracing#110723
shashjar merged 18 commits intomasterfrom
shashjar/organization-events-tracing-load-performance-issues-eap-query

Conversation

@shashjar
Copy link
Copy Markdown
Member

Implements double reads of occurrences from EAP for load_performance_issues in src/sentry/api/endpoints/organization_events_trace.py.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 16, 2026
Base automatically changed from shashjar/fix-occurrence-category-filtering-occurrences-on-eap to master March 16, 2026 21:03
occurrence_category=OccurrenceCategory.ISSUE_PLATFORM,
)
eap_occurrence_ids = [
{"occurrence_id": row["issue_occurrence_id"]}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Note to self: investigate whether EAP supports aliasing in queries for renaming columns in result data - would be useful in these cases where we need to apply transformations to EAP data to get it to match legacy Snuba formats

if self.span_serialized:
self.load_span_serialized_performance_issues(light)
else:
elif snuba_params is not None:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Made this change and the change below to the load_performance_issues signature because snuba_params is passed in all cases of TraceEvent creation, except for this one where span_serialized is passed as True instead. Open to opinions on whether adding a runtime assertion or an else case with logger.{warning/exception} would be good practice.

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.

I think since this is technically a behavioral change, it would be appropriate to add a logger.exception line.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sounds good to me!

@shashjar shashjar requested review from a team and thetruecpaul March 16, 2026 23:17
@shashjar shashjar marked this pull request as ready for review March 16, 2026 23:17
@shashjar shashjar requested review from a team as code owners March 16, 2026 23:17
@shashjar shashjar removed the request for review from a team March 16, 2026 23:17
if self.span_serialized:
self.load_span_serialized_performance_issues(light)
else:
elif snuba_params is not None:
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.

I think since this is technically a behavioral change, it would be appropriate to add a logger.exception line.

Copy link
Copy Markdown
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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

@shashjar shashjar merged commit d80ab0f into master Mar 19, 2026
77 of 78 checks passed
@shashjar shashjar deleted the shashjar/organization-events-tracing-load-performance-issues-eap-query branch March 19, 2026 15:28
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