Skip to content

Commit 87f8f39

Browse files
author
getsentry-bot
committed
Merge branch 'release/2.40.0'
2 parents bf77a86 + 04968c4 commit 87f8f39

File tree

4 files changed

+45
-3
lines changed

4 files changed

+45
-3
lines changed

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
# Changelog
22

3+
## 2.40.0
4+
5+
### Various fixes & improvements
6+
7+
- Add LiteLLM integration (#4864) by @constantinius
8+
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:
9+
10+
```python
11+
import sentry_sdk
12+
from sentry_sdk.integrations.litellm import LiteLLMIntegration
13+
sentry_sdk.init(
14+
dsn="<your-dsn>",
15+
# Set traces_sample_rate to 1.0 to capture 100%
16+
# of transactions for tracing.
17+
traces_sample_rate=1.0,
18+
# Add data like inputs and responses;
19+
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
20+
send_default_pii=True,
21+
integrations=[
22+
LiteLLMIntegration(),
23+
],
24+
)
25+
```
26+
27+
- Litestar: Copy request info to prevent cookies mutation (#4883) by @alexander-alderman-webb
28+
- Add tracing to `DramatiqIntegration` (#4571) by @Igreh
29+
- Also emit spans for MCP tool calls done by the LLM (#4875) by @constantinius
30+
- Option to not trace HTTP requests based on status codes (#4869) by @alexander-alderman-webb
31+
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.
32+
33+
```python
34+
import sentry_sdk
35+
36+
sentry_sdk.init(
37+
trace_ignore_status_codes={301, 302, 303, *range(305, 400), 404},
38+
)
39+
```
40+
41+
- Move `_set_agent_data` call to `ai_client_span` function (#4876) by @constantinius
42+
- Add script to determine lowest supported versions (#4867) by @sentrivana
43+
- Update `CONTRIBUTING.md` (#4870) by @sentrivana
44+
345
## 2.39.0
446

547
### Various fixes & improvements

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
copyright = "2019-{}, Sentry Team and Contributors".format(datetime.now().year)
3232
author = "Sentry Team and Contributors"
3333

34-
release = "2.39.0"
34+
release = "2.40.0"
3535
version = ".".join(release.split(".")[:2]) # The short X.Y version.
3636

3737

sentry_sdk/consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,4 +1343,4 @@ def _get_default_options():
13431343
del _get_default_options
13441344

13451345

1346-
VERSION = "2.39.0"
1346+
VERSION = "2.40.0"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def get_file_text(file_name):
2121

2222
setup(
2323
name="sentry-sdk",
24-
version="2.39.0",
24+
version="2.40.0",
2525
author="Sentry Team and Contributors",
2626
author_email="[email protected]",
2727
url="https://github.com/getsentry/sentry-python",

0 commit comments

Comments
 (0)