Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZeroDivisionError: float division by zero #82082

Closed
sentry-io bot opened this issue Dec 13, 2024 · 1 comment · Fixed by #83155
Closed

ZeroDivisionError: float division by zero #82082

sentry-io bot opened this issue Dec 13, 2024 · 1 comment · Fixed by #83155
Assignees

Comments

@sentry-io
Copy link

sentry-io bot commented Dec 13, 2024

Sentry Issue: SENTRY-3KJB

ZeroDivisionError: float division by zero
  File "sentry/dynamic_sampling/models/common.py", line 28, in guarded_run
    return model.run(model_input)
  File "sentry/dynamic_sampling/models/base.py", line 38, in run
    return self._run(model_input)
  File "sentry/dynamic_sampling/models/transactions_rebalancing.py", line 133, in _run
    implicit_rate = implicit_budget / total_implicit
@constantinius constantinius self-assigned this Dec 13, 2024
@constantinius
Copy link
Contributor

This is actually two issues in disguise:
1. when no transactions/classes are passed in (sentry/dynamic_sampling/models/transactions_rebalancing.py in _run at line 133)
2. when transactions/classes are passed, but the total count is equal to the total explicit count, resulting in the total_implicit to be 0, thus resulting in the ZeroDivisionError (sentry/dynamic_sampling/models/transactions_rebalancing.py in _run at line 110)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant