Skip to content

Commit 13ec872

Browse files
shellmayrclaude
andcommitted
feat(dynamic-sampling): Record EAP and outcomes volume in sliding-window comparison
Emit dynamic_sampling.per_org.sliding_window.eap_volume and .outcomes_volume alongside the existing sample-rate metrics so the volumes behind each computed rate can be compared directly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ef5b1cc commit 13ec872

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/sentry/dynamic_sampling/per_org/calculations.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,20 @@ def sample_rate_for(volume: OrganizationDataVolume | None) -> float | None:
9595
sample_rate=1.0,
9696
tags=tags,
9797
)
98+
if eap_volume is not None:
99+
metrics.distribution(
100+
f"{SLIDING_WINDOW_METRIC_PREFIX}.eap_volume",
101+
eap_volume.total,
102+
sample_rate=1.0,
103+
tags=tags,
104+
)
105+
if outcomes_volume is not None:
106+
metrics.distribution(
107+
f"{SLIDING_WINDOW_METRIC_PREFIX}.outcomes_volume",
108+
outcomes_volume.total,
109+
sample_rate=1.0,
110+
tags=tags,
111+
)
98112

99113

100114
def run_project_balancing(

0 commit comments

Comments
 (0)