Skip to content

Conversation

@mjq
Copy link
Member

@mjq mjq commented Nov 24, 2025

Continues the work started in #103739.

As a first step to adding incremental segment name clustering to segment enrichment, record each seen segment name (like we do for transaction names in Sentry's event_manager). To work around the different signatures for transactions and segment spans, I extracted as much of the logic as I could into a second function, with one caller per scenario.

As with the previous PR, the changes are behind an org flag (organizations:normalize_segment_names_in_span_enrichment) for testing and easy rollback.

Closes ENG-5951.

Continues the work started in #103739.

As a first step to adding incremental segment name clustering to segment
enrichment, record each seen segment name (like we do for transaction names in
Sentry's `event_manager`). To work around the different signatures for
transactions and segment spans, I extracted as much of the logic as I could
into a second function, with one caller per scenario.

As with the previous PR, the changes are behind an org flag
(organizations:normalize_segment_names_in_span_enrichment) for testing and easy
rollback.
@mjq mjq requested review from a team as code owners November 24, 2025 19:34
@linear
Copy link

linear bot commented Nov 24, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 24, 2025
@codecov
Copy link

codecov bot commented Nov 25, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
30044 1 30043 240
View the top 1 failed test(s) by shortest run time
tests.sentry.core.endpoints.test_organization_index.OrganizationsCreateTest::test_valid_slugs
Stack Traces | 1.88s run time
#x1B[1m#x1B[.../core/endpoints/test_organization_index.py#x1B[0m:190: in test_valid_slugs
    response = self.get_success_response(name=input_slug, slug=input_slug)
#x1B[1m#x1B[.../sentry/testutils/cases.py#x1B[0m:628: in get_success_response
    assert_status_code(response, 200, 300)
#x1B[1m#x1B[.../sentry/testutils/asserts.py#x1B[0m:47: in assert_status_code
    assert minimum <= response.status_code < maximum, (
#x1B[1m#x1B[31mE   AssertionError: (500, b'{"detail":"Internal Error","errorId":null}')#x1B[0m
#x1B[1m#x1B[31mE   assert 500 < 300#x1B[0m
#x1B[1m#x1B[31mE    +  where 500 = <Response status_code=500, "application/json">.status_code#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@mjq mjq merged commit a1472e4 into master Nov 26, 2025
66 checks passed
@mjq mjq deleted the mjq/2025-11-24/record-incoming-segment-names branch November 26, 2025 15:58
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.

3 participants