|
5 | 5 | ### Various fixes & improvements |
6 | 6 |
|
7 | 7 | - Pydantic AI integration (#4906) by @constantinius |
8 | | - |
| 8 | + |
9 | 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 | 10 |
|
11 | 11 | ```python |
|
25 | 25 | ) |
26 | 26 | ``` |
27 | 27 | - MCP Python SDK (#4964) by @constantinius |
28 | | - |
| 28 | + |
29 | 29 | Enable the new Python MCP integration with the code snippet below: |
30 | 30 |
|
31 | 31 | ```python |
|
44 | 44 | ], |
45 | 45 | ) |
46 | 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 | + ``` |
47 | 61 | - fix(google-genai): Set agent name (#5038) by @constantinius |
48 | 62 | - fix(integrations): hooking into error tracing function to find out if an execute tool span should be set to error (#4986) by @constantinius |
49 | 63 | - fix(django): Improve logic for classifying cache hits and misses (#5029) by @alexander-alderman-webb |
50 | 64 | - chore(metrics): Rename \_metrics to metrics (#5035) by @alexander-alderman-webb |
51 | 65 | - fix(tracemetrics): Bump metric buffer size to 1k (#5031) by @k-fish |
52 | 66 | - fix startlette deprecation warning (#5034) by @DeoLeung |
53 | | -- fix(strawberry): Remove autodetection, always use sync extension (#4984) by @sentrivana |
54 | 67 | - build(deps): bump actions/upload-artifact from 4 to 5 (#5032) by @dependabot |
55 | 68 | - fix(ai): truncate messages for google genai (#4992) by @shellmayr |
56 | 69 | - fix(ai): add message truncation to litellm (#4973) by @shellmayr |
|
113 | 126 | ### Various fixes & improvements |
114 | 127 |
|
115 | 128 | - feat: Add `concurrent.futures` patch to threading integration (#4770) by @alexander-alderman-webb |
116 | | - |
| 129 | + |
117 | 130 | The SDK now makes sure to automatically preserve span relationships when using `ThreadPoolExecutor`. |
118 | 131 | - chore: Remove old metrics code (#4899) by @sentrivana |
119 | 132 |
|
|
128 | 141 |
|
129 | 142 | - Add LiteLLM integration (#4864) by @constantinius |
130 | 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: |
131 | | - |
| 144 | + |
132 | 145 | ```python |
133 | 146 | import sentry_sdk |
134 | 147 | from sentry_sdk.integrations.litellm import LiteLLMIntegration |
|
151 | 164 | - Also emit spans for MCP tool calls done by the LLM (#4875) by @constantinius |
152 | 165 | - Option to not trace HTTP requests based on status codes (#4869) by @alexander-alderman-webb |
153 | 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. |
154 | | - |
| 167 | + |
155 | 168 | ```python |
156 | 169 | import sentry_sdk |
157 | | - |
| 170 | + |
158 | 171 | sentry_sdk.init( |
159 | 172 | trace_ignore_status_codes={301, 302, 303, *range(305, 400), 404}, |
160 | 173 | ) |
|
0 commit comments