Skip to content

feat(dynamic-sampling): allow spen segment metrics in GetActiveOrgs and GetActiveOrgsVolumes#106955

Merged
shellmayr merged 3 commits intomasterfrom
shellmayr/feat/ds-common-span-metric
Jan 30, 2026
Merged

feat(dynamic-sampling): allow spen segment metrics in GetActiveOrgs and GetActiveOrgsVolumes#106955
shellmayr merged 3 commits intomasterfrom
shellmayr/feat/ds-common-span-metric

Conversation

@shellmayr
Copy link
Member

@shellmayr shellmayr commented Jan 26, 2026

Add support for querying span metrics in GetActiveOrgs and GetActiveOrgsVolumes by:

  • Adding use_span_metric parameter (default False) to both classes
  • Pass the measure into the query classes to control which metrics are queried - which is consistent with the way it is done in bd5c47f

This allows callers to switch between transaction and span-based metrics tagged with is_segment for organization volume queries.

Closes TET-1532

@linear
Copy link

linear bot commented Jan 26, 2026

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 26, 2026
@shellmayr shellmayr force-pushed the shellmayr/feat/ds-common-span-metric branch from 34c11f9 to b1ea43d Compare January 28, 2026 14:56
…s and GetActiveOrgsVolumes

Add support for querying span metrics in GetActiveOrgs and GetActiveOrgsVolumes by:
- Adding use_span_metric parameter (default False) to both classes
- When enabled, uses SpanMRI.COUNT_PER_ROOT_PROJECT instead of TransactionMRI
- When enabled, filters by is_segment=true to only count root spans
- Uses appropriate UseCaseID (SPANS vs TRANSACTIONS) based on the metric type

This allows callers to switch between transaction and span-based metrics for organization
volume queries.
@shellmayr shellmayr marked this pull request as ready for review January 29, 2026 13:53
@shellmayr shellmayr requested a review from a team as a code owner January 29, 2026 13:53
@shellmayr shellmayr changed the title feat(dynamic-sampling): add use_span_metric parameter to GetActiveOrgs and GetActiveOrgsVolumes feat(dynamic-sampling): allow spen segment metrics in GetActiveOrgs and GetActiveOrgsVolumes Jan 29, 2026
@shellmayr shellmayr merged commit 1f5f686 into master Jan 30, 2026
68 checks passed
@shellmayr shellmayr deleted the shellmayr/feat/ds-common-span-metric branch January 30, 2026 09:43
priscilawebdev pushed a commit that referenced this pull request Feb 2, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2026
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