Skip to content

Commit d864ba0

Browse files
Merge branch 'master' into major/3.0
2 parents 3df52a1 + 6d2e663 commit d864ba0

File tree

25 files changed

+1418
-119
lines changed

25 files changed

+1418
-119
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ jobs:
7979
run: |
8080
set -x # print commands that are executed
8181
./scripts/runtox.sh "py${{ matrix.python-version }}-mcp"
82+
- name: Test fastmcp
83+
run: |
84+
set -x # print commands that are executed
85+
./scripts/runtox.sh "py${{ matrix.python-version }}-fastmcp"
8286
- name: Test openai-base
8387
run: |
8488
set -x # print commands that are executed

CHANGELOG.md

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

3+
## 2.45.0
4+
5+
### Various fixes & improvements
6+
7+
- OTLPIntegration (#4877) by @sl0thentr0py
8+
9+
Enable the new OTLP integration with the code snippet below, and your OpenTelemetry instrumentation will be automatically sent to Sentry's OTLP ingestion endpoint.
10+
11+
```python
12+
import sentry_sdk
13+
from sentry_sdk.integrations.otlp import OTLPIntegration
14+
15+
sentry_sdk.init(
16+
dsn="<your-dsn>",
17+
# Add data like inputs and responses;
18+
# see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
19+
send_default_pii=True,
20+
integrations=[
21+
OTLPIntegration(),
22+
],
23+
)
24+
```
25+
26+
Under the hood, this will setup:
27+
- A `SpanExporter` that will automatically set up the OTLP ingestion endpoint from your DSN
28+
- A `Propagator` that ensures Distributed Tracing works
29+
- Trace/Span linking for all other Sentry events such as Errors, Logs, Crons and Metrics
30+
31+
If you were using the `SentrySpanProcessor` before, we recommend migrating over to `OTLPIntegration` since it's a much simpler setup.
32+
33+
- feat(integrations): implement context management for invoke_agent spans (#5089) by @constantinius
34+
- feat(loguru): Capture extra (#5096) by @sentrivana
35+
- feat: Attach `server.address` to metrics (#5113) by @alexander-alderman-webb
36+
- fix: Cast message and detail attributes before appending exception notes (#5114) by @alexander-alderman-webb
37+
- fix(integrations): ensure that GEN_AI_AGENT_NAME is properly set for GEN_AI spans under an invoke_agent span (#5030) by @constantinius
38+
- fix(logs): Update `sentry.origin` (#5112) by @sentrivana
39+
- chore: Deprecate description truncation option for Redis spans (#5073) by @alexander-alderman-webb
40+
- chore: Deprecate `max_spans` LangChain parameter (#5074) by @alexander-alderman-webb
41+
- chore(toxgen): Check availability of pip and add detail to exceptions (#5076) by @alexander-alderman-webb
42+
- chore: add MCP SDK Pydantic AI and OpenAI Agents to the list of auto enabled integrations (#5111) by @constantinius
43+
- test: add tests for either FastMCP implementation (#5075) by @constantinius
44+
- fix(ci): Re-enable skipped tests (#5104) by @sentrivana
45+
- ci: 🤖 Update test matrix with new releases (11/17) (#5110) by @github-actions
46+
- ci: Force coverage core ctrace for 3.14 (#5108) by @sl0thentr0py
47+
348
## 2.44.0
449

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

3737

scripts/populate_tox/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@
247247
"*": ["pytest-asyncio"],
248248
},
249249
},
250+
"fastmcp": {
251+
"package": "fastmcp",
252+
"deps": {
253+
"*": ["pytest-asyncio"],
254+
},
255+
},
250256
"openai-base": {
251257
"package": "openai",
252258
"integration_name": "openai",

scripts/populate_tox/releases.jsonl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@
7070
{"info": {"classifiers": ["Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: AsyncIO", "Framework :: FastAPI", "Framework :: Pydantic", "Framework :: Pydantic :: 1", "Framework :: Pydantic :: 2", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "fastapi", "requires_python": ">=3.8", "version": "0.121.2", "yanked": false}, "urls": [{"packagetype": "bdist_wheel", "filename": "fastapi-0.121.2-py3-none-any.whl"}, {"packagetype": "sdist", "filename": "fastapi-0.121.2.tar.gz"}]}
7171
{"info": {"classifiers": ["Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: AsyncIO", "Framework :: FastAPI", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "fastapi", "requires_python": ">=3.6.1", "version": "0.79.1", "yanked": false}, "urls": [{"packagetype": "bdist_wheel", "filename": "fastapi-0.79.1-py3-none-any.whl"}, {"packagetype": "sdist", "filename": "fastapi-0.79.1.tar.gz"}]}
7272
{"info": {"classifiers": ["Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: AsyncIO", "Framework :: FastAPI", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed"], "name": "fastapi", "requires_python": ">=3.7", "version": "0.93.0", "yanked": false}, "urls": [{"packagetype": "bdist_wheel", "filename": "fastapi-0.93.0-py3-none-any.whl"}, {"packagetype": "sdist", "filename": "fastapi-0.93.0.tar.gz"}]}
73+
{"info": {"classifiers": [], "name": "fastmcp", "requires_python": ">=3.10", "version": "0.1.0", "yanked": false}, "urls": [{"packagetype": "bdist_wheel", "filename": "fastmcp-0.1.0-py3-none-any.whl"}, {"packagetype": "sdist", "filename": "fastmcp-0.1.0.tar.gz"}]}
74+
{"info": {"classifiers": [], "name": "fastmcp", "requires_python": ">=3.10", "version": "0.4.1", "yanked": false}, "urls": [{"packagetype": "bdist_wheel", "filename": "fastmcp-0.4.1-py3-none-any.whl"}, {"packagetype": "sdist", "filename": "fastmcp-0.4.1.tar.gz"}]}
75+
{"info": {"classifiers": [], "name": "fastmcp", "requires_python": ">=3.10", "version": "1.0", "yanked": false}, "urls": [{"packagetype": "bdist_wheel", "filename": "fastmcp-1.0-py3-none-any.whl"}, {"packagetype": "sdist", "filename": "fastmcp-1.0.tar.gz"}]}
76+
{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Typing :: Typed"], "name": "fastmcp", "requires_python": ">=3.10", "version": "2.13.0", "yanked": false}, "urls": [{"packagetype": "bdist_wheel", "filename": "fastmcp-2.13.0-py3-none-any.whl"}, {"packagetype": "sdist", "filename": "fastmcp-2.13.0.tar.gz"}]}
7377
{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "google-genai", "requires_python": ">=3.9", "version": "1.29.0", "yanked": false}, "urls": [{"packagetype": "bdist_wheel", "filename": "google_genai-1.29.0-py3-none-any.whl"}, {"packagetype": "sdist", "filename": "google_genai-1.29.0.tar.gz"}]}
7478
{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "google-genai", "requires_python": ">=3.9", "version": "1.36.0", "yanked": false}, "urls": [{"packagetype": "bdist_wheel", "filename": "google_genai-1.36.0-py3-none-any.whl"}, {"packagetype": "sdist", "filename": "google_genai-1.36.0.tar.gz"}]}
7579
{"info": {"classifiers": ["Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.9", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules"], "name": "google-genai", "requires_python": ">=3.9", "version": "1.43.0", "yanked": false}, "urls": [{"packagetype": "bdist_wheel", "filename": "google_genai-1.43.0-py3-none-any.whl"}, {"packagetype": "sdist", "filename": "google_genai-1.43.0.tar.gz"}]}

scripts/split_tox_gh_actions/split_tox_gh_actions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"langgraph",
8080
"litellm",
8181
"mcp",
82+
"fastmcp",
8283
"openai-base",
8384
"openai-notiktoken",
8485
"openai_agents",

sentry_sdk/client.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,13 @@ def _capture_metric(self, metric):
10061006
metric["attributes"]["sentry.sdk.name"] = SDK_INFO["name"]
10071007
metric["attributes"]["sentry.sdk.version"] = SDK_INFO["version"]
10081008

1009+
server_name = self.options.get("server_name")
1010+
if (
1011+
server_name is not None
1012+
and SPANDATA.SERVER_ADDRESS not in metric["attributes"]
1013+
):
1014+
metric["attributes"][SPANDATA.SERVER_ADDRESS] = server_name
1015+
10091016
environment = self.options.get("environment")
10101017
if environment is not None and "sentry.environment" not in metric["attributes"]:
10111018
metric["attributes"]["sentry.environment"] = environment

sentry_sdk/consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1442,4 +1442,4 @@ def _get_default_options():
14421442
del _get_default_options
14431443

14441444

1445-
VERSION = "2.44.0"
1445+
VERSION = "2.45.0"

0 commit comments

Comments
 (0)