Skip to content

Commit e21166b

Browse files
committed
Merge branch 'master' into ivana/python-3.14
2 parents 4c2fd7d + 4325802 commit e21166b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3783
-136
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252

5353
# Initializes the CodeQL tools for scanning.
5454
- name: Initialize CodeQL
55-
uses: github/codeql-action/init@v3
55+
uses: github/codeql-action/init@v4
5656
with:
5757
languages: ${{ matrix.language }}
5858
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -63,7 +63,7 @@ jobs:
6363
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6464
# If this step fails, then you should remove it and run the build manually (see below)
6565
- name: Autobuild
66-
uses: github/codeql-action/autobuild@v3
66+
uses: github/codeql-action/autobuild@v4
6767

6868
# ℹ️ Command-line programs to run using the OS shell.
6969
# 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
@@ -77,4 +77,4 @@ jobs:
7777
# make release
7878

7979
- name: Perform CodeQL Analysis
80-
uses: github/codeql-action/analyze@v3
80+
uses: github/codeql-action/analyze@v4

.github/workflows/test-integrations-ai.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ jobs:
5858
run: |
5959
set -x # print commands that are executed
6060
./scripts/runtox.sh "py${{ matrix.python-version }}-cohere"
61+
- name: Test google_genai
62+
run: |
63+
set -x # print commands that are executed
64+
./scripts/runtox.sh "py${{ matrix.python-version }}-google_genai"
65+
- name: Test huggingface_hub
66+
run: |
67+
set -x # print commands that are executed
68+
./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub"
6169
- name: Test langchain-base
6270
run: |
6371
set -x # print commands that are executed
@@ -66,6 +74,10 @@ jobs:
6674
run: |
6775
set -x # print commands that are executed
6876
./scripts/runtox.sh "py${{ matrix.python-version }}-langchain-notiktoken"
77+
- name: Test langgraph
78+
run: |
79+
set -x # print commands that are executed
80+
./scripts/runtox.sh "py${{ matrix.python-version }}-langgraph"
6981
- name: Test litellm
7082
run: |
7183
set -x # print commands that are executed
@@ -78,18 +90,10 @@ jobs:
7890
run: |
7991
set -x # print commands that are executed
8092
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-notiktoken"
81-
- name: Test langgraph
82-
run: |
83-
set -x # print commands that are executed
84-
./scripts/runtox.sh "py${{ matrix.python-version }}-langgraph"
8593
- name: Test openai_agents
8694
run: |
8795
set -x # print commands that are executed
8896
./scripts/runtox.sh "py${{ matrix.python-version }}-openai_agents"
89-
- name: Test huggingface_hub
90-
run: |
91-
set -x # print commands that are executed
92-
./scripts/runtox.sh "py${{ matrix.python-version }}-huggingface_hub"
9397
- name: Generate coverage XML (Python 3.6)
9498
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
9599
run: |

CHANGELOG.md

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

3+
## 2.42.0
4+
5+
### Various fixes & improvements
6+
7+
- feat: Add source information for slow outgoing HTTP requests (#4902) by @alexander-alderman-webb
8+
- tests: Update tox (#4913) by @sentrivana
9+
- fix(Ray): Retain the original function name when patching Ray tasks (#4858) by @svartalf
10+
- feat(ai): Add `python-genai` integration (#4891) by @vgrozdanic
11+
Enable the new Google GenAI integration with the code snippet below, and you can use the Sentry AI dashboards to observe your AI calls:
12+
13+
```python
14+
import sentry_sdk
15+
from sentry_sdk.integrations.google_genai import GoogleGenAIIntegration
16+
sentry_sdk.init(
17+
dsn="<your-dsn>",
18+
# Set traces_sample_rate to 1.0 to capture 100%
19+
# of transactions for tracing.
20+
traces_sample_rate=1.0,
21+
# Add data like inputs and responses;
22+
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
23+
send_default_pii=True,
24+
integrations=[
25+
GoogleGenAIIntegration(),
26+
],
27+
)
28+
```
29+
30+
## 2.41.0
31+
32+
### Various fixes & improvements
33+
34+
- feat: Add `concurrent.futures` patch to threading integration (#4770) by @alexander-alderman-webb
35+
36+
The SDK now makes sure to automatically preserve span relationships when using `ThreadPoolExecutor`.
37+
- chore: Remove old metrics code (#4899) by @sentrivana
38+
39+
Removed all code related to the deprecated experimental metrics feature (`sentry_sdk.metrics`).
40+
- ref: Remove "experimental" from log function name (#4901) by @sentrivana
41+
- fix(ai): Add mapping for gen_ai message roles (#4884) by @shellmayr
42+
- feat(metrics): Add trace metrics behind an experiments flag (#4898) by @k-fish
43+
344
## 2.40.0
445

546
### 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.40.0"
34+
release = "2.42.0"
3535
version = ".".join(release.split(".")[:2]) # The short X.Y version.
3636

3737

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ ignore_missing_imports = true
118118
module = "langgraph.*"
119119
ignore_missing_imports = true
120120

121+
[[tool.mypy.overrides]]
122+
module = "google.genai.*"
123+
ignore_missing_imports = true
124+
121125
[[tool.mypy.overrides]]
122126
module = "executing.*"
123127
ignore_missing_imports = true

scripts/populate_tox/config.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@
142142
"package": "gql[all]",
143143
"num_versions": 2,
144144
},
145+
"google_genai": {
146+
"package": "google-genai",
147+
"deps": {
148+
"*": ["pytest-asyncio"],
149+
},
150+
"python": ">=3.9",
151+
},
145152
"graphene": {
146153
"package": "graphene",
147154
"deps": {
@@ -233,7 +240,10 @@
233240
"*": ["pytest-asyncio", "tiktoken"],
234241
"<1.55": ["httpx<0.28"],
235242
},
236-
"python": ">=3.8",
243+
"python": {
244+
">0.0,<2.3": ">=3.8",
245+
">=2.3": ">=3.9",
246+
},
237247
},
238248
"openai-notiktoken": {
239249
"package": "openai",
@@ -242,7 +252,10 @@
242252
"*": ["pytest-asyncio"],
243253
"<1.55": ["httpx<0.28"],
244254
},
245-
"python": ">=3.8",
255+
"python": {
256+
">0.0,<2.3": ">=3.8",
257+
">=2.3": ">=3.9",
258+
},
246259
},
247260
"openai_agents": {
248261
"package": "openai-agents",

0 commit comments

Comments
 (0)