|
@@ -31,6 +31,7 @@ from sentry.dynamic_sampling.tasks.helpers.recalibrate_orgs import (
|
|
|
set_guarded_adjusted_factor,
|
|
|
)
|
|
|
from sentry.dynamic_sampling.tasks.logging import (
|
|
|
+ log_recalibrate_org_state,
|
|
|
log_recalibrate_orgs_errors,
|
|
|
log_sample_rate_source,
|
|
|
)
|
|
@@ -111,6 +112,11 @@ def recalibrate_org(org_volume: OrganizationDataVolume) -> None:
|
|
|
# We get the previous factor that was used for the recalibration.
|
|
|
previous_factor = get_adjusted_factor(org_volume.org_id)
|
|
|
|
|
|
+ log_recalibrate_org_state(
|
|
|
+ org_volume.org_id, previous_factor, effective_sample_rate, target_sample_rate
|
|
|
+ )
|
|
|
+
|
|
|
+ # We want to compute the new adjusted factor.
|
|
|
adjusted_factor = compute_adjusted_factor(
|
|
|
previous_factor, effective_sample_rate, target_sample_rate
|
|
|
)
|