Skip to content

ref(dynamic-sampling): Count unnamed root transactions instead of dropping them - #120911

Merged
shellmayr merged 5 commits into
masterfrom
feat/ds-empty-dsc-transaction-test
Jul 30, 2026
Merged

ref(dynamic-sampling): Count unnamed root transactions instead of dropping them#120911
shellmayr merged 5 commits into
masterfrom
feat/ds-empty-dsc-transaction-test

Conversation

@shellmayr

@shellmayr shellmayr commented Jul 30, 2026

Copy link
Copy Markdown
Member
  • Remove the has:sentry.dsc.transaction clause from the get_eap_transaction_volumes query in src/sentry/dynamic_sampling/per_org/queries.py, so root spans without a transaction name are counted - this aligns the new pipeline with fix(ds): Strip transactions if they above the tag length limit relay#6271
  • Coalesce missing and empty values to "" and sum their counts, so the rebalancing model sees one unnamed class rather than two — one of which would have been named "None" (which is however not present in the ingestion pipeline)

Contributes to TET-2754

Root spans can carry an empty sentry.dsc.transaction. EAP returns it as
its own group, so without the has:sentry.dsc.transaction clause it takes
a slot in the per-project top-N and reaches the rebalancing model as a
transaction named "".

The test stores an empty-string root span, an absent-attribute root span
and two real ones, then replays the captured query without the has:
clause to show the clause is what drops them.
@linear-code

linear-code Bot commented Jul 30, 2026

Copy link
Copy Markdown

TET-2754

…action test

The replayed control query added a second snuba round trip and coupled the
test to the exact query string. Assert the returned volumes only.
Root spans with an empty or absent sentry.dsc.transaction now reach the
transaction rebalancing model, as "" and "None", and each takes a slot in
the per-project top-N.

Inverts the two tests that asserted the old exclusion.
@shellmayr shellmayr changed the title test(dynamic-sampling): Cover empty sentry.dsc.transaction exclusion ref(dynamic-sampling): Drop the has:sentry.dsc.transaction query filter Jul 30, 2026
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Jul 30, 2026
@shellmayr shellmayr changed the title ref(dynamic-sampling): Drop the has:sentry.dsc.transaction query filter fix(dynamic-sampling): don't exclude empty sentry.dsc.transaction Jul 30, 2026
EAP returns a root span with no sentry.dsc.transaction and one named "" as
two groups. Sum them into a single "" class so the rebalancing model sees
one unnamed transaction, not two, one of them named "None".
@shellmayr shellmayr changed the title fix(dynamic-sampling): don't exclude empty sentry.dsc.transaction ref(dynamic-sampling): Count unnamed root transactions instead of dropping them Jul 30, 2026
@shellmayr
shellmayr marked this pull request as ready for review July 30, 2026 18:00
@shellmayr
shellmayr requested a review from a team as a code owner July 30, 2026 18:00
@shellmayr
shellmayr merged commit 5661884 into master Jul 30, 2026
65 of 66 checks passed
@shellmayr
shellmayr deleted the feat/ds-empty-dsc-transaction-test branch July 30, 2026 18:15
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