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

OverflowError #2340

Closed
decaz opened this issue Sep 1, 2023 · 2 comments · Fixed by #2347
Closed

OverflowError #2340

decaz opened this issue Sep 1, 2023 · 2 comments · Fixed by #2347
Assignees

Comments

@decaz
Copy link

decaz commented Sep 1, 2023

How do you use Sentry?

Self-hosted/on-premise

Version

1.30.0

Steps to Reproduce

Sentry SDK initialised as following:

sentry_sdk.init(
    dsn='...',
    release='...',
    environment='...',
    send_default_pii=True,
    request_bodies='always',
    traces_sample_rate=1.0,
    integrations=[
        FlaskIntegration(),
        StarletteIntegration(),
        FastApiIntegration(),
        SqlalchemyIntegration(),
        RedisIntegration(),
    ],
    auto_enabling_integrations=False,
)

CPython 3.11.5

Expected Result

No exceptions.

Actual Result

Exception raised inside Sentry SDK:

Traceback (most recent call last):
  File “/project/.venv/lib/python3.11/site-packages/uvicorn/protocols/http/h11_impl.py", line 408, in run_asgi
    result = await app(  # type: ignore[func-returns-value]
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/project/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 143, in _create_span_call
    return await old_call(app, scope, new_receive, new_send, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/project/.venv/lib/python3.11/site-packages/uvicorn/middleware/proxy_headers.py", line 84, in __call__
    return await self.app(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/project/.venv/lib/python3.11/site-packages/fastapi/applications.py", line 292, in __call__
    await super().__call__(scope, receive, send)
  File "/project/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/starlette.py", line 348, in _sentry_patched_asgi_app
    return await middleware(scope, receive, send)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/project/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 141, in _run_asgi3
    return await self._run_app(scope, receive, send, asgi_version=3)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/project/.venv/lib/python3.11/site-packages/sentry_sdk/integrations/asgi.py", line 182, in _run_app
    with hub.start_transaction(
         ^^^^^^^^^^^^^^^^^^^^^^
  File "/project/.venv/lib/python3.11/site-packages/sentry_sdk/hub.py", line 563, in start_transaction
    transaction._set_initial_sampling_decision(sampling_context=sampling_context)
  File "/project/.venv/lib/python3.11/site-packages/sentry_sdk/tracing.py", line 761, in _set_initial_sampling_decision
    self.sample_rate /= client.monitor.downsample_factor
OverflowError: int too large to convert to float
@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Sep 1, 2023
@sentrivana
Copy link
Contributor

Hey @decaz, thanks for the report. While we look at this you can set enable_backpressure_handling=False in your sentry_sdk.init(), that should disable the Monitor altogether. Alternatively downgrading to 1.29.2 should do the trick in the meantime.

@sentrivana
Copy link
Contributor

cc @sl0thentr0py

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

Successfully merging a pull request may close this issue.

4 participants