Skip to content

Commit bf30403

Browse files
Call out new default for middleware spans and fix formatting in changelog
1 parent 19e0d1f commit bf30403

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

CHANGELOG.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
## 2.48.0
44

5+
Middleware spans are now disabled by default in Django, Starlette and FastAPI integrations. Set the `middleware_spans` integration-level
6+
option to enable capturing individual spans per middleware layer. To record Django middleware spans, for example, configure as follows
7+
8+
```python
9+
import sentry_sdk
10+
from sentry_sdk.integrations.django import DjangoIntegration
11+
12+
sentry_sdk.init(
13+
dsn="<your-dsn>",
14+
integrations=[
15+
DjangoIntegration(middleware_spans=True),
16+
],
17+
)
18+
```
19+
520
### New Features ✨
621

722
- feat(ai): add single message truncation by @shellmayr in [#5079](https://github.com/getsentry/sentry-python/pull/5079)
@@ -24,10 +39,9 @@
2439

2540
### Bug Fixes 🐛
2641

27-
- fix(django): Set active thread ID when middleware spans are disabled by @alexander-alderman-webb in [#5220](https://github.com/getsentry/sentry-python/pull/5220)
28-
2942
#### Integrations
3043

44+
- fix(django): Set active thread ID when middleware spans are disabled by @alexander-alderman-webb in [#5220](https://github.com/getsentry/sentry-python/pull/5220)
3145
- fix(integrations): openai-agents fixing the input messages structure which was wrapped too much in some cases by @constantinius in [#5203](https://github.com/getsentry/sentry-python/pull/5203)
3246
- fix(integrations): openai-agents fix multi-patching of `get_model` function by @constantinius in [#5195](https://github.com/getsentry/sentry-python/pull/5195)
3347
- fix(integrations): add values for pydantic-ai and openai-agents to `_INTEGRATION_DEACTIVATES` to prohibit double span creation by @constantinius in [#5196](https://github.com/getsentry/sentry-python/pull/5196)
@@ -56,9 +70,6 @@
5670
- ref: Cleanup outgoing propagation_context logic by @sl0thentr0py in [#5215](https://github.com/getsentry/sentry-python/pull/5215)
5771
- ci: Pin Python version to at least 3.10 for LiteLLM by @alexander-alderman-webb in [#5202](https://github.com/getsentry/sentry-python/pull/5202)
5872
- test: Remove skipped test by @sentrivana in [#5197](https://github.com/getsentry/sentry-python/pull/5197)
59-
60-
### Other
61-
6273
- Convert all remaining type annotations into the modern format by @zsol in [#5239](https://github.com/getsentry/sentry-python/pull/5239)
6374
- Convert sentry_sdk type annotations into the modern format by @zsol in [#5206](https://github.com/getsentry/sentry-python/pull/5206)
6475

0 commit comments

Comments
 (0)