Skip to content

chore(segment-enhancement): Add tracing to segment name normalization#104395

Merged
mjq merged 2 commits intomasterfrom
mjq/2025-12-04/instrument-segment-name-normalization
Dec 4, 2025
Merged

chore(segment-enhancement): Add tracing to segment name normalization#104395
mjq merged 2 commits intomasterfrom
mjq/2025-12-04/instrument-segment-name-normalization

Conversation

@mjq
Copy link
Copy Markdown
Member

@mjq mjq commented Dec 4, 2025

This PR adds instrumentation to segment enhancement to better understand how segment name normalization performs, and to compare before and after performance improvements:

  • Wrap segment enhancement's entry point (process_message) in a transaction with a low sample rate
  • Wrap the normalize segment name step in a span, as well as its component _scrub_identifiers and _apply_clustering_rules steps.

The value of SENTRY_PROCESS_SEGMENTS_TRANSACTIONS_SAMPLE_RATE matches the calculation for the sample rate of the save_event_transaction task. Segment clustering should have similar volume, and therefore this should be a safe sampling rate.

@mjq mjq requested review from a team as code owners December 4, 2025 16:25
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 4, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #104395      +/-   ##
===========================================
- Coverage   80.54%    80.53%   -0.02%     
===========================================
  Files        9346      9346              
  Lines      400084    400222     +138     
  Branches    25618     25618              
===========================================
+ Hits       322251    322316      +65     
- Misses      77380     77453      +73     
  Partials      453       453              

@mjq mjq merged commit 94ddab4 into master Dec 4, 2025
67 checks passed
@mjq mjq deleted the mjq/2025-12-04/instrument-segment-name-normalization branch December 4, 2025 18:24
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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