From d3c7b62687e10398d162d551e916e16441a1a8e5 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 1 Jun 2026 11:53:30 +0200 Subject: [PATCH 1/2] feat: Add httpx2 integration page --- docs/platforms/python/integrations/index.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/platforms/python/integrations/index.mdx b/docs/platforms/python/integrations/index.mdx index 6b7941469605de..ad8f9c42fbebc2 100644 --- a/docs/platforms/python/integrations/index.mdx +++ b/docs/platforms/python/integrations/index.mdx @@ -93,6 +93,7 @@ The Sentry SDK uses integrations to hook into the functionality of popular libra | ------------------------------------------------------------------------------------------------------------------------------ | :--------------: | | | ✓ | | | ✓ | +| | ✓ | | | | | Python standard HTTP client (in the [Default Integrations](default-integrations/#stdlib)) | ✓ | | `Requests` HTTP instrumentation is done via the [Default Integrations](default-integrations/#stdlib). | ✓ | From e68255e4070cac7af1ff3407d512eb8f6d2bd5f9 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Mon, 1 Jun 2026 12:10:14 +0200 Subject: [PATCH 2/2] maybe actually commit the page --- .../python/integrations/httpx2/index.mdx | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 docs/platforms/python/integrations/httpx2/index.mdx diff --git a/docs/platforms/python/integrations/httpx2/index.mdx b/docs/platforms/python/integrations/httpx2/index.mdx new file mode 100644 index 00000000000000..beb2cba011005c --- /dev/null +++ b/docs/platforms/python/integrations/httpx2/index.mdx @@ -0,0 +1,48 @@ +--- +title: HTTPX2 +description: "Learn about the HTTPX2 integration and how it adds support for the HTTPX2 HTTP client." +--- + +The [HTTPX2](https://httpx2.pydantic.dev/) integration instruments outgoing HTTP requests using either the sync or the async HTTPX2 clients. + +Use this integration to create spans for outgoing requests and ensure traces are properly propagated to downstream services. + +## Install + +Install `sentry-sdk` from PyPI: + +```bash {tabTitle:pip} +pip install sentry-sdk +``` +```bash {tabTitle:uv} +uv add sentry-sdk +``` + +## Configure + +The HTTPX2 integration is enabled automatically if you have the `httpx2` package installed. + + + +## Verify + +```python +import httpx2 + +def main(): + sentry_init(...) # same as above + with sentry_sdk.start_transaction(name="testing_sentry"): + r1 = httpx2.get("https://sentry.io/") + r2 = httpx2.post("http://httpbin.org/post") + +main() +``` + +This will create a transaction called `testing_sentry` in the Performance section of [sentry.io](https://sentry.io), and create spans for the outgoing HTTP requests. + +It takes a couple of moments for the data to appear in [sentry.io](https://sentry.io). + +## Supported Versions + +- HTTPX2: 2.0+ +- Python: 3.10+