Skip to content

feat(source-map-issues): Adding group id and title as attr to processing error trace item#112387

Merged
Abdkhan14 merged 3 commits intomasterfrom
abdk/source-map-issue-impact-v1
Apr 8, 2026
Merged

feat(source-map-issues): Adding group id and title as attr to processing error trace item#112387
Abdkhan14 merged 3 commits intomasterfrom
abdk/source-map-issue-impact-v1

Conversation

@Abdkhan14
Copy link
Copy Markdown
Contributor

  • The sample events should be links that take us to the corresponding issue details
  • Sending title and group id as attributes so that we don't have to
      1. fetch the trace items for the event_ids and then
      1. fetch the full events using the event details endpoints
Screenshot 2026-04-07 at 11 49 57 PM

@Abdkhan14 Abdkhan14 requested review from a team as code owners April 7, 2026 17:59
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Apr 7, 2026
Comment thread src/sentry/processing_errors/eap/producer.py Outdated
Comment on lines +1280 to +1282
produce_processing_errors_to_eap(
event.project, event.data, processing_errors, group_id=event.group_id, title=event.title
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the group id should already be available in the occurrence data, are you sure that you need this?

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.

@wedamija We'd have the source map issue's group_id in the occurrence data, instead of the the group_id of the sample events that triggered detection

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 2 potential issues.

Fix All in Cursor

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: group_id stored as string, inconsistent with occurrences dataset
    • I changed processing error EAP production and attribute registration to store group_id as an integer so it is written and queried with numeric semantics consistently.
  • ✅ Resolved by another fix: Inconsistent group_id type across EAP datasets
    • The same change that switched processing errors group_id to integer in both producer payloads and attribute metadata also resolves this cross-dataset type inconsistency.

Create PR

Or push these changes by commenting:

@cursor push 719cc87b4a
Preview (719cc87b4a)
diff --git a/src/sentry/processing_errors/eap/producer.py b/src/sentry/processing_errors/eap/producer.py
--- a/src/sentry/processing_errors/eap/producer.py
+++ b/src/sentry/processing_errors/eap/producer.py
@@ -105,7 +105,7 @@
                 attributes["title"] = title
 
             if group_id is not None:
-                attributes["group_id"] = str(group_id)
+                attributes["group_id"] = group_id
 
             item_id = hex_to_item_id(
                 uuid.uuid5(PROCESSING_ERROR_NAMESPACE, f"{event_data['event_id']}:{index}").hex

diff --git a/src/sentry/search/eap/processing_errors/attributes.py b/src/sentry/search/eap/processing_errors/attributes.py
--- a/src/sentry/search/eap/processing_errors/attributes.py
+++ b/src/sentry/search/eap/processing_errors/attributes.py
@@ -63,7 +63,7 @@
         ResolvedAttribute(
             public_alias="group_id",
             internal_name="group_id",
-            search_type="string",
+            search_type="integer",
         ),
     ]
 }

diff --git a/tests/sentry/processing_errors/eap/test_producer.py b/tests/sentry/processing_errors/eap/test_producer.py
--- a/tests/sentry/processing_errors/eap/test_producer.py
+++ b/tests/sentry/processing_errors/eap/test_producer.py
@@ -124,7 +124,7 @@
         assert trace_item.attributes["sdk_name"].string_value == "sentry.javascript.browser"
         assert trace_item.attributes["sdk_version"].string_value == "7.0.0"
         assert trace_item.attributes["title"].string_value == "ReferenceError: undefined variable"
-        assert trace_item.attributes["group_id"].string_value == "12345"
+        assert trace_item.attributes["group_id"].int_value == 12345
 
     @patch("sentry.processing_errors.eap.producer._eap_producer")
     @patch("sentry.processing_errors.eap.producer.get_topic_definition")

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b3d8508. Configure here.

Comment thread src/sentry/processing_errors/eap/producer.py Outdated
Comment thread src/sentry/search/eap/processing_errors/attributes.py
@Abdkhan14 Abdkhan14 merged commit 6e94491 into master Apr 8, 2026
62 checks passed
@Abdkhan14 Abdkhan14 deleted the abdk/source-map-issue-impact-v1 branch April 8, 2026 18:03
george-sentry pushed a commit that referenced this pull request Apr 9, 2026
…ing error trace item (#112387)

- The sample events should be links that take us to the corresponding
issue details
- Sending title and group id as attributes so that we don't have to 
- - 1) fetch the trace items for the event_ids and then
- - 2) fetch the full events using the event details endpoints
<img width="693" height="384" alt="Screenshot 2026-04-07 at 11 49 57 PM"
src="https://github.com/user-attachments/assets/7e351577-af8e-447c-a4d4-5af0a77b8bd1"
/>

---------

Co-authored-by: Abdullah Khan <abdullahkhan@PG9Y57YDXQ.local>
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