Skip to content

Commit 3e35d63

Browse files
Merge branch 'major/3.0' into webb/openai-agents/limit-provider-name
2 parents e9a4d8a + 8c2d49e commit 3e35d63

146 files changed

Lines changed: 17424 additions & 18141 deletions

File tree

Some content is hidden

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

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ jobs:
6969
run: |
7070
set -x # print commands that are executed
7171
./scripts/runtox.sh "py${{ matrix.python-version }}-openai-notiktoken"
72+
- name: Test typesafe
73+
run: |
74+
set -x # print commands that are executed
75+
./scripts/runtox.sh "py${{ matrix.python-version }}-typesafe"
7276
- name: Upload coverage data
7377
if: ${{ !cancelled() }}
7478
continue-on-error: true

‎CHANGELOG.md‎

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

3+
## 2.71.0
4+
5+
### New Features ✨
6+
7+
- **New integration:** TypeSafe (#4733) by @alexander-alderman-webb
8+
9+
Add the TypeSafe integration to your `sentry_sdk.init` call:
10+
11+
```python
12+
import sentry_sdk
13+
from sentry_sdk.integrations.typesafe import TypeSafeIntegration
14+
15+
sentry_sdk.init(
16+
dsn="...",
17+
traces_sample_rate=1.0,
18+
integrations=[
19+
TypeSafeIntegration(),
20+
]
21+
)
22+
```
23+
24+
#### Typesafe
25+
26+
- Record `gen_ai.output.messages` by @alexander-alderman-webb in [#7720](https://github.com/getsentry/sentry-python/pull/7720)
27+
- Set token usage attributes by @alexander-alderman-webb in [#7719](https://github.com/getsentry/sentry-python/pull/7719)
28+
- Record `gen_ai.input.messages` by @alexander-alderman-webb in [#7718](https://github.com/getsentry/sentry-python/pull/7718)
29+
- Record `gen_ai.response.model` by @alexander-alderman-webb in [#7717](https://github.com/getsentry/sentry-python/pull/7717)
30+
- Add integration with `system_one()` patches by @alexander-alderman-webb in [#7716](https://github.com/getsentry/sentry-python/pull/7716)
31+
32+
### Bug Fixes 🐛
33+
34+
- Keep event if processor raises by @sentrivana in [#7701](https://github.com/getsentry/sentry-python/pull/7701)
35+
- Isolate user callbacks, emit client reports by @sentrivana in [#7692](https://github.com/getsentry/sentry-python/pull/7692)
36+
37+
### Documentation 📚
38+
39+
- Promote `data_collection` in changelog by @sentrivana in [#7565](https://github.com/getsentry/sentry-python/pull/7565)
40+
41+
### Internal Changes 🔧
42+
43+
- (aws-lambda) Add `.gitignore` to lambda handlers by @pabloDeputter in [#7638](https://github.com/getsentry/sentry-python/pull/7638)
44+
- (litellm) Set `LITELLM_LOCAL_MODEL_COST_MAP=true` by @alexander-alderman-webb in [#7630](https://github.com/getsentry/sentry-python/pull/7630)
45+
- (otlp) Adjust to `OTLPSpanExporter._headers` removal by @alexander-alderman-webb in [#7722](https://github.com/getsentry/sentry-python/pull/7722)
46+
- Use top-level flush API in tests by @sentrivana in [#7725](https://github.com/getsentry/sentry-python/pull/7725)
47+
- Unsample on sampler exception by @sentrivana in [#7723](https://github.com/getsentry/sentry-python/pull/7723)
48+
- Use `sentry_init` fixture by @sentrivana in [#7577](https://github.com/getsentry/sentry-python/pull/7577)
49+
350
## 2.70.0
451

552
### New Features ✨

‎MIGRATION_GUIDE.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
3131
- The option `attach_stacktrace` is now `True` by default, meaning the SDK will attach stack traces to messages.
3232
- The Django integration now creates spans for cache operations by default. Pass `DjangoIntegration(cache_spans=False)` to `sentry_sdk.init()` to turn them off.
3333
- The Django integration no longer force-enables cache spans when Spotlight is active and `settings.DEBUG` is `True`. The `cache_spans` option is now always respected as given.
34+
- Exception groups in exception chains are now properly unfurled.
3435

3536
### Logging
3637

@@ -121,6 +122,7 @@ Looking to upgrade from Sentry SDK 2.x to 3.x? Here's a comprehensive list of wh
121122
- Dropped support for Pydantic AI below 1.76.
122123
- Dropped support for OpenAI Agents below 0.10.3.
123124
- Dropped support for MCP below 2.0.
125+
- Removed the `transaction_style` option from server integrations (DjangoIntegration, StarletteIntegration, FastApiIntegration, AioHttpIntegration, FlaskIntegration, PyramidIntegration, QuartIntegration, BottleIntegration, FalconIntegration, StarliteIntegration and LitestarIntegration).
124126
- Removed the RedisIntegration `max_data_size` option.
125127
- Removed the possibility to supply a specific client to the LaunchDarklyIntegration.
126128
- The `enable_tracing` option was removed. Use `traces_sample_rate=1.0` instead.

‎docs/apidocs.rst‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ API Docs
3535
.. autoclass:: sentry_sdk.attachments.Attachment
3636
:members:
3737

38-
.. autoclass:: sentry_sdk.scrubber.EventScrubber
39-
:members:
40-
4138
.. autoclass:: sentry_sdk.monitor.Monitor
4239
:members:
4340

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

3737

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ typing = [
8181
"aiohttp>=3.14.3",
8282
"openai-agents>=0.22.0",
8383
"mistralai>=2.10.1",
84+
"typesafe-sdk>=0.7.2",
8485
]
8586
test = [
8687
"dataclasses ; python_full_version < '3.7'",

‎scripts/populate_tox/config.py‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@
235235
"package": "huggingface_hub",
236236
"deps": {
237237
"*": ["responses", "pytest-httpx"],
238+
">=2": ["httpx2-pytest"],
238239
},
239240
},
240241
"langchain-base": {
@@ -472,12 +473,13 @@
472473
"pytest-asyncio",
473474
"python-multipart",
474475
"requests",
475-
"anyio<4.0.0",
476476
"jinja2",
477477
"httpx",
478478
],
479479
# See the comment on FastAPI's httpx bound for more info
480480
"<0.37.2": ["httpx<0.28.0"],
481+
# Starlette <0.21 uses anyio.start_blocking_portal which was removed in anyio 4.
482+
"<0.21": ["anyio<4"],
481483
},
482484
},
483485
"starlite": {
@@ -533,6 +535,13 @@
533535
"package": "typer",
534536
"num_versions": 2,
535537
},
538+
"typesafe": {
539+
"package": "typesafe-sdk",
540+
"integration_name": "typesafe",
541+
"deps": {
542+
"*": ["pytest-asyncio"],
543+
},
544+
},
536545
"unleash": {
537546
"package": "UnleashClient",
538547
"num_versions": 2,

‎scripts/populate_tox/package_dependencies.jsonl‎

Lines changed: 249 additions & 219 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)