sentry icon indicating copy to clipboard operation
sentry copied to clipboard

Adding tag to Edit Event Highlights gives error "fail to update project"

Open bruno-garcia opened this issue 7 months ago • 4 comments

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

On issue: https://sentry-sdks.sentry.io/issues/6670027812/events/c6303066de074a3eb81a9924e4927011/?project=4509276197879808

Edit the event highlights:

Image

Add the following tags:

Image

Note the error message. Repeating the action continues to error out.

Adding just "engine mode" is enough to repro:

Image

Expected Result

no error

Actual Result

error

Image

Product Area

Unknown

Link

https://sentry-sdks.sentry.io/issues/6670027812/events/c6303066de074a3eb81a9924e4927011/?project=4509276197879808

DSN

No response

Version

No response

bruno-garcia avatar Jun 10 '25 14:06 bruno-garcia

Routing to @getsentry/product-owners-issues for triage ⏲️

getsantry[bot] avatar Jun 10 '25 14:06 getsantry[bot]

Adding that a user reported the same issue here: https://sentry.zendesk.com/agent/tickets/154631

When I went to repro, I noticed that any context where the key has a space in it will be marked as an invalid change. I made a screen recording here.

The "Unreal Engine" above has a space, so may be related.

The screen recording below was captured in my internal Sentry test org -

https://github.com/user-attachments/assets/496c1594-3513-4dd9-9427-4b25de6e2ff4

Fwang36 avatar Jun 10 '25 18:06 Fwang36

I wasn't able to easily repro this with tests - added to the issue workflow team's backlog for more investigation.

test attempt diff
diff --git a/tests/sentry/api/endpoints/test_project_details.py b/tests/sentry/api/endpoints/test_project_details.py
index d82687a6359..c5be53f966f 100644
--- a/tests/sentry/api/endpoints/test_project_details.py
+++ b/tests/sentry/api/endpoints/test_project_details.py
@@ -885,7 +885,7 @@ class ProjectUpdateTest(APITestCase):
         assert resp.data["highlightPreset"] == preset

         # Set to custom
-        highlight_tags = ["bears", "beets", "battlestar_galactica"]
+        highlight_tags = ["bears", "beets", "battlestar galactica"]
         resp = self.get_success_response(
             self.org_slug,
             self.proj_slug,
@@ -914,7 +914,7 @@ class ProjectUpdateTest(APITestCase):

         # Set to custom
         highlight_context_type = "bird-words"
-        highlight_context = {highlight_context_type: ["red", "robin", "blue", "jay", "red", "blue"]}
+        highlight_context = {highlight_context_type: ["red", "robin", "blue", "jay", "red", "blue", "red blue"]}
         resp = self.get_success_response(
             self.org_slug,
             self.proj_slug,
@@ -930,7 +930,7 @@ class ProjectUpdateTest(APITestCase):
         assert (
             len(option_result[highlight_context_type])
             == len(resp_result[highlight_context_type])
-            == 4
+            == 5
         )

         # Set to empty

mrduncan avatar Jun 11 '25 19:06 mrduncan

Same issue with my Rust Tracing Fields context fields which is the default for the rust sdk.

Image

luca992 avatar Jun 11 '25 20:06 luca992

This should be fixed by https://github.com/getsentry/sentry/pull/96894 and our Linear integration automatically closed this issue when I merged that PR 😅 But please reopen this issue or let me know if these tags are still not working for you! @bruno-garcia @luca992 🙏🏽

isabellaenriquez avatar Aug 01 '25 17:08 isabellaenriquez