Conversation
…' into shashjar/update-occurrences-on-eap-attribute-definitions
…s' into shashjar/fix-occurrence-category-filtering-occurrences-on-eap
…' into shashjar/update-occurrences-on-eap-attribute-definitions
…s' into shashjar/fix-occurrence-category-filtering-occurrences-on-eap
…performance-issues-eap-query
| occurrence_category=OccurrenceCategory.ISSUE_PLATFORM, | ||
| ) | ||
| eap_occurrence_ids = [ | ||
| {"occurrence_id": row["issue_occurrence_id"]} |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
I think since this is technically a behavioral change, it would be appropriate to add a logger.exception line.
| if self.span_serialized: | ||
| self.load_span_serialized_performance_issues(light) | ||
| else: | ||
| elif snuba_params is not None: |
There was a problem hiding this comment.
I think since this is technically a behavioral change, it would be appropriate to add a logger.exception line.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Implements double reads of occurrences from EAP for
load_performance_issuesinsrc/sentry/api/endpoints/organization_events_trace.py.