|  | 
| 1 | 1 | # Changelog | 
| 2 | 2 | 
 | 
|  | 3 | +## 2.43.0 | 
|  | 4 | + | 
|  | 5 | +### Various fixes & improvements | 
|  | 6 | + | 
|  | 7 | +- Pydantic AI integration (#4906) by @constantinius | 
|  | 8 | + | 
|  | 9 | +  Enable the new Pydantic AI integration with the code snippet below, and you can use the Sentry AI dashboards to observe your AI calls: | 
|  | 10 | + | 
|  | 11 | +  ```python | 
|  | 12 | +  import sentry_sdk | 
|  | 13 | +  from sentry_sdk.integrations.pydantic_ai import PydanticAIIntegration | 
|  | 14 | +  sentry_sdk.init( | 
|  | 15 | +      dsn="<your-dsn>", | 
|  | 16 | +      # Set traces_sample_rate to 1.0 to capture 100% | 
|  | 17 | +      # of transactions for tracing. | 
|  | 18 | +      traces_sample_rate=1.0, | 
|  | 19 | +      # Add data like inputs and responses; | 
|  | 20 | +      # see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info | 
|  | 21 | +      send_default_pii=True, | 
|  | 22 | +      integrations=[ | 
|  | 23 | +          PydanticAIIntegration(), | 
|  | 24 | +      ], | 
|  | 25 | +  ) | 
|  | 26 | +  ``` | 
|  | 27 | +- MCP Python SDK (#4964) by @constantinius | 
|  | 28 | + | 
|  | 29 | +  Enable the new Python MCP integration with the code snippet below: | 
|  | 30 | + | 
|  | 31 | +  ```python | 
|  | 32 | +  import sentry_sdk | 
|  | 33 | +  from sentry_sdk.integrations.mcp import MCPIntegration | 
|  | 34 | +  sentry_sdk.init( | 
|  | 35 | +      dsn="<your-dsn>", | 
|  | 36 | +      # Set traces_sample_rate to 1.0 to capture 100% | 
|  | 37 | +      # of transactions for tracing. | 
|  | 38 | +      traces_sample_rate=1.0, | 
|  | 39 | +      # Add data like inputs and responses; | 
|  | 40 | +      # see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info | 
|  | 41 | +      send_default_pii=True, | 
|  | 42 | +      integrations=[ | 
|  | 43 | +          MCPIntegration(), | 
|  | 44 | +      ], | 
|  | 45 | +  ) | 
|  | 46 | +  ``` | 
|  | 47 | +- fix(strawberry): Remove autodetection, always use sync extension (#4984) by @sentrivana | 
|  | 48 | + | 
|  | 49 | +  Previously, `StrawberryIntegration` would try to guess whether it should install the sync or async version of itself. This auto-detection was very brittle and could lead to us auto-enabling async code in a sync context. With this change, `StrawberryIntegration` remains an auto-enabling integration, but it'll enable the sync version by default. If you want to enable the async version, pass the option explicitly: | 
|  | 50 | + | 
|  | 51 | +  ```python | 
|  | 52 | +  sentry_sdk.init( | 
|  | 53 | +      # ... | 
|  | 54 | +      integrations=[ | 
|  | 55 | +          StrawberryIntegration( | 
|  | 56 | +              async_execution=True | 
|  | 57 | +          ), | 
|  | 58 | +      ], | 
|  | 59 | +  ) | 
|  | 60 | +  ``` | 
|  | 61 | +- fix(google-genai): Set agent name (#5038) by @constantinius | 
|  | 62 | +- fix(integrations): hooking into error tracing function to find out if an execute tool span should be set to error (#4986) by @constantinius | 
|  | 63 | +- fix(django): Improve logic for classifying cache hits and misses (#5029) by @alexander-alderman-webb | 
|  | 64 | +- chore(metrics): Rename \_metrics to metrics (#5035) by @alexander-alderman-webb | 
|  | 65 | +- fix(tracemetrics): Bump metric buffer size to 1k (#5031) by @k-fish | 
|  | 66 | +- fix startlette deprecation warning (#5034) by @DeoLeung | 
|  | 67 | +- build(deps): bump actions/upload-artifact from 4 to 5 (#5032) by @dependabot | 
|  | 68 | +- fix(ai): truncate messages for google genai (#4992) by @shellmayr | 
|  | 69 | +- fix(ai): add message truncation to litellm (#4973) by @shellmayr | 
|  | 70 | +- feat(langchain): Support v1 (#4874) by @sentrivana | 
|  | 71 | +- ci: Run `common` test suite on Python 3.14t (#4969) by @alexander-alderman-webb | 
|  | 72 | +- feat: Officially support 3.14 & run integration tests on 3.14 (#4974) by @sentrivana | 
|  | 73 | +- Make logger template format safer to missing kwargs (#4981) by @sl0thentr0py | 
|  | 74 | +- tests(huggingface): Support 1.0.0rc7 (#4979) by @alexander-alderman-webb | 
|  | 75 | +- feat: Enable HTTP request code origin by default (#4967) by @alexander-alderman-webb | 
|  | 76 | +- ci: Run `common` test suite on Python 3.14 (#4896) by @sentrivana | 
|  | 77 | + | 
| 3 | 78 | ## 2.42.1 | 
| 4 | 79 | 
 | 
| 5 | 80 | ### Various fixes & improvements | 
|  | 
| 51 | 126 | ### Various fixes & improvements | 
| 52 | 127 | 
 | 
| 53 | 128 | - feat: Add `concurrent.futures` patch to threading integration (#4770) by @alexander-alderman-webb | 
| 54 |  | -   | 
|  | 129 | + | 
| 55 | 130 |   The SDK now makes sure to automatically preserve span relationships when using `ThreadPoolExecutor`. | 
| 56 | 131 | - chore: Remove old metrics code (#4899) by @sentrivana | 
| 57 | 132 | 
 | 
|  | 
| 66 | 141 | 
 | 
| 67 | 142 | - Add LiteLLM integration (#4864) by @constantinius | 
| 68 | 143 |   Once you've enabled the [new LiteLLM integration](https://docs.sentry.io/platforms/python/integrations/litellm/), you can use the Sentry AI Agents Monitoring, a Sentry dashboard that helps you understand what's going on with your AI requests: | 
| 69 |  | -   | 
|  | 144 | + | 
| 70 | 145 |   ```python | 
| 71 | 146 |   import sentry_sdk | 
| 72 | 147 |   from sentry_sdk.integrations.litellm import LiteLLMIntegration | 
|  | 
| 89 | 164 | - Also emit spans for MCP tool calls done by the LLM (#4875) by @constantinius | 
| 90 | 165 | - Option to not trace HTTP requests based on status codes (#4869) by @alexander-alderman-webb | 
| 91 | 166 |   You can now disable transactions for incoming requests with specific HTTP status codes. The [new `trace_ignore_status_codes` option](https://docs.sentry.io/platforms/python/configuration/options/#trace_ignore_status_codes) accepts a `set` of status codes as integers. If a transaction wraps a request that results in one of the provided status codes, the transaction will be unsampled. | 
| 92 |  | -     | 
|  | 167 | + | 
| 93 | 168 |   ```python | 
| 94 | 169 |   import sentry_sdk | 
| 95 |  | -   | 
|  | 170 | + | 
| 96 | 171 |   sentry_sdk.init( | 
| 97 | 172 |       trace_ignore_status_codes={301, 302, 303, *range(305, 400), 404}, | 
| 98 | 173 |   ) | 
|  | 
0 commit comments