Skip to content

breaking(transport): Make HTTP2Transport the default #4492

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

Draft
wants to merge 4 commits into
base: potel-base
Choose a base branch
from

Conversation

BYK
Copy link
Member

@BYK BYK commented Jun 18, 2025

Making the HTTP2 transport the default when h2 and httpcore packages are installed. We've been testing this on Sentry SaaS for a while without any issues.

We should promote installing the SDK as sentry-sdk[http2] for this to be picked up though. Since we still have to support Python 3.7 and h2 not being supported there, we cannot install it by default and use HTTP2 directly.


EDIT: please merge after potel dogfooding

@BYK BYK requested a review from a team as a code owner June 18, 2025 11:16
@BYK BYK marked this pull request as draft June 18, 2025 11:17
Copy link

codecov bot commented Jun 18, 2025

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
20684 5 20679 4363
View the top 3 failed test(s) by shortest run time
::tests.integrations.sanic.test_sanic
Stack Traces | 0s run time
.tox/py3.12-sanic-v24.6/lib/python3.12.../site-packages/_pytest/python.py:498: in importtestmodule
    mod = import_path(
.tox/py3.12-sanic-v24.6/lib/python3.12.../site-packages/_pytest/pathlib.py:587: in import_path
    importlib.import_module(module_name)
.../hostedtoolcache/Python/3.12.10.../x64/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:999: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
.../integrations/sanic/__init__.py:3: in <module>
    pytest.importorskip("sanic")
.tox/py3.12-sanic-v24.6/lib/python3.12.../site-packages/sanic/__init__.py:6: in <module>
    from sanic.app import Sanic
.tox/py3.12-sanic-v24.6/lib/python3.12.../site-packages/sanic/app.py:58: in <module>
    from sanic.application.state import ApplicationState, ServerStage
.tox/py3.12-sanic-v24.6/lib/python3.12.../sanic/application/state.py:13: in <module>
    from sanic.server.async_server import AsyncioServer
.tox/py3.12-sanic-v24.6/lib/python3.12.../sanic/server/__init__.py:5: in <module>
    from sanic.server.runners import serve
.tox/py3.12-sanic-v24.6/lib/python3.12.../sanic/server/runners.py:6: in <module>
    from sanic.config import Config
.tox/py3.12-sanic-v24.6/lib/python3.12.../site-packages/sanic/config.py:13: in <module>
    from sanic.errorpages import DEFAULT_FORMAT, check_error_format
.tox/py3.12-sanic-v24.6/lib/python3.12.../site-packages/sanic/errorpages.py:27: in <module>
    from sanic.pages.error import ErrorPage
.tox/py3.12-sanic-v24.6/lib/python3.12.../sanic/pages/error.py:3: in <module>
    import tracerite.html
.tox/py3.12-sanic-v24.6/lib/python3.12.../site-packages/tracerite/__init__.py:1: in <module>
    from .html import html_traceback
.tox/py3.12-sanic-v24.6/lib/python3.12.../site-packages/tracerite/html.py:3: in <module>
    from .trace import extract_chain
.tox/py3.12-sanic-v24.6/lib/python3.12.../site-packages/tracerite/trace.py:11: in <module>
    from .inspector import extract_variables
E     File ".../sentry-python/sentry-python/.tox/py3.12-sanic-v24.6/lib/python3.12.../site-packages/tracerite/inspector.py", line 119
E       except AttributeError, TypeError:
E              ^^^^^^^^^^^^^^^^^^^^^^^^^
E   SyntaxError: multiple exception types must be parenthesized
::tests.integrations.sanic.test_sanic
Stack Traces | 0s run time
.tox/py3.13-sanic-latest/lib/python3.13.../site-packages/_pytest/python.py:498: in importtestmodule
    mod = import_path(
.tox/py3.13-sanic-latest/lib/python3.13.../site-packages/_pytest/pathlib.py:587: in import_path
    importlib.import_module(module_name)
.../hostedtoolcache/Python/3.13.4.../x64/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1310: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:1026: in exec_module
    ???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
    ???
.../integrations/sanic/__init__.py:3: in <module>
    pytest.importorskip("sanic")
.tox/py3.13-sanic-latest/lib/python3.13.../site-packages/sanic/__init__.py:6: in <module>
    from sanic.app import Sanic
.tox/py3.13-sanic-latest/lib/python3.13.../site-packages/sanic/app.py:50: in <module>
    from sanic.application.state import ApplicationState, ServerStage
.tox/py3.13-sanic-latest/lib/python3.13.../sanic/application/state.py:13: in <module>
    from sanic.server.async_server import AsyncioServer
.tox/py3.13-sanic-latest/lib/python3.13.../sanic/server/__init__.py:5: in <module>
    from sanic.server.runners import serve
.tox/py3.13-sanic-latest/lib/python3.13.../sanic/server/runners.py:6: in <module>
    from sanic.config import Config
.tox/py3.13-sanic-latest/lib/python3.13.../site-packages/sanic/config.py:12: in <module>
    from sanic.errorpages import DEFAULT_FORMAT, check_error_format
.tox/py3.13-sanic-latest/lib/python3.13.../site-packages/sanic/errorpages.py:27: in <module>
    from sanic.pages.error import ErrorPage
.tox/py3.13-sanic-latest/lib/python3.13.../sanic/pages/error.py:4: in <module>
    import tracerite.html
.tox/py3.13-sanic-latest/lib/python3.13.../site-packages/tracerite/__init__.py:1: in <module>
    from .html import html_traceback
.tox/py3.13-sanic-latest/lib/python3.13.../site-packages/tracerite/html.py:3: in <module>
    from .trace import extract_chain
.tox/py3.13-sanic-latest/lib/python3.13.../site-packages/tracerite/trace.py:11: in <module>
    from .inspector import extract_variables
E     File ".../sentry-python/sentry-python/.tox/py3.13-sanic-latest/lib/python3.13.../site-packages/tracerite/inspector.py", line 119
E       except AttributeError, TypeError:
E              ^^^^^^^^^^^^^^^^^^^^^^^^^
E   SyntaxError: multiple exception types must be parenthesized
::tests.integrations.sanic.test_sanic
Stack Traces | 0s run time
.tox/py3.11-sanic-v24.6/lib/python3.11.../site-packages/_pytest/python.py:498: in importtestmodule
    mod = import_path(
.tox/py3.11-sanic-v24.6/lib/python3.11.../site-packages/_pytest/pathlib.py:587: in import_path
    importlib.import_module(module_name)
.../hostedtoolcache/Python/3.11.12.../x64/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1204: in _gcd_import
    ???
<frozen importlib._bootstrap>:1176: in _find_and_load
    ???
<frozen importlib._bootstrap>:1126: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:241: in _call_with_frames_removed
    ???
<frozen importlib._bootstrap>:1204: in _gcd_import
    ???
<frozen importlib._bootstrap>:1176: in _find_and_load
    ???
<frozen importlib._bootstrap>:1147: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:690: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:940: in exec_module
    ???
<frozen importlib._bootstrap>:241: in _call_with_frames_removed
    ???
.../integrations/sanic/__init__.py:3: in <module>
    pytest.importorskip("sanic")
.tox/py3.11-sanic-v24.6/lib/python3.11.../site-packages/sanic/__init__.py:6: in <module>
    from sanic.app import Sanic
.tox/py3.11-sanic-v24.6/lib/python3.11.../site-packages/sanic/app.py:58: in <module>
    from sanic.application.state import ApplicationState, ServerStage
.tox/py3.11-sanic-v24.6/lib/python3.11.../sanic/application/state.py:13: in <module>
    from sanic.server.async_server import AsyncioServer
.tox/py3.11-sanic-v24.6/lib/python3.11.../sanic/server/__init__.py:5: in <module>
    from sanic.server.runners import serve
.tox/py3.11-sanic-v24.6/lib/python3.11.../sanic/server/runners.py:6: in <module>
    from sanic.config import Config
.tox/py3.11-sanic-v24.6/lib/python3.11.../site-packages/sanic/config.py:13: in <module>
    from sanic.errorpages import DEFAULT_FORMAT, check_error_format
.tox/py3.11-sanic-v24.6/lib/python3.11.../site-packages/sanic/errorpages.py:27: in <module>
    from sanic.pages.error import ErrorPage
.tox/py3.11-sanic-v24.6/lib/python3.11.../sanic/pages/error.py:3: in <module>
    import tracerite.html
.tox/py3.11-sanic-v24.6/lib/python3.11.../site-packages/tracerite/__init__.py:1: in <module>
    from .html import html_traceback
.tox/py3.11-sanic-v24.6/lib/python3.11.../site-packages/tracerite/html.py:3: in <module>
    from .trace import extract_chain
.tox/py3.11-sanic-v24.6/lib/python3.11.../site-packages/tracerite/trace.py:11: in <module>
    from .inspector import extract_variables
E     File ".../sentry-python/sentry-python/.tox/py3.11-sanic-v24.6/lib/python3.11.../site-packages/tracerite/inspector.py", line 119
E       except AttributeError, TypeError:
E              ^^^^^^^^^^^^^^^^^^^^^^^^^
E   SyntaxError: multiple exception types must be parenthesized

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@BYK BYK marked this pull request as ready for review June 18, 2025 13:36
@BYK
Copy link
Member Author

BYK commented Jun 18, 2025

The test failures look unrelated and consistent with each other.

@sl0thentr0py
Copy link
Member

ty @BYK, will take over and fix the tests.

will also make this a draft till we're ready to merge!

@sl0thentr0py sl0thentr0py marked this pull request as draft June 18, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants