Skip to content

Commit 68b9ef2

Browse files
committed
Merge branch 'master' into feat/span-first
2 parents 4b2147d + e103926 commit 68b9ef2

File tree

19 files changed

+1274
-297
lines changed

19 files changed

+1274
-297
lines changed

.claude/settings.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@
2727
"WebFetch(domain:docs.sentry.io)",
2828
"WebFetch(domain:develop.sentry.dev)",
2929
"Bash(grep:*)",
30-
"Bash(mv:*)"
30+
"Bash(mv:*)",
31+
"Bash(source .venv/bin/activate)",
32+
"Bash(tox:*)",
33+
"Bash(tox.venv/bin/tox:*)",
34+
"Bash(.tox/*/bin/python:*)",
35+
"Bash(.tox/*/bin/pytest:*)",
36+
"Bash(.tox/*/bin/ruff:*)"
3137
],
3238
"deny": []
3339
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ sentry-python-serverless*.zip
2121
.eggs
2222
venv
2323
.venv
24+
tox.venv
25+
toxgen.venv
2426
.vscode/tags
2527
.pytest_cache
2628
.hypothesis

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Use **tox** for testing (not pytest directly):
1111
- Test matrix configuration is in `tox.ini`
1212
- Integration tests: `tox -e py3.14-{integration}-v{version}`
1313
- Common tests: `tox -e py3.14-common`
14+
- Run specific test file: `TESTPATH=tests/integrations/logging/test_logging.py tox -e py3.14-common`
15+
- Run single test: `TESTPATH=tests/path/to/test_file.py tox -e py3.14-common -- -k "test_name"`
1416

1517
## Type Checking
1618

CHANGELOG.md

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,83 @@
44

55
This is an alpha release for internal testing.
66

7+
## 2.55.0
8+
9+
### New Features ✨
10+
11+
#### Anthropic
12+
13+
- Record finish reasons in AI monitoring spans by @ericapisani in [#5678](https://github.com/getsentry/sentry-python/pull/5678)
14+
- Emit `gen_ai.chat` spans for asynchronous `messages.stream()` by @alexander-alderman-webb in [#5572](https://github.com/getsentry/sentry-python/pull/5572)
15+
- Emit AI Client Spans for synchronous `messages.stream()` by @alexander-alderman-webb in [#5565](https://github.com/getsentry/sentry-python/pull/5565)
16+
- Set gen_ai.response.id span attribute by @ericapisani in [#5662](https://github.com/getsentry/sentry-python/pull/5662)
17+
- Add `gen_ai.system` attribute to spans by @ericapisani in [#5661](https://github.com/getsentry/sentry-python/pull/5661)
18+
19+
#### Pydantic Ai
20+
21+
- Support ImageUrl content type in span instrumentation by @ericapisani in [#5629](https://github.com/getsentry/sentry-python/pull/5629)
22+
- Add tool description to execute_tool spans by @ericapisani in [#5596](https://github.com/getsentry/sentry-python/pull/5596)
23+
24+
#### Other
25+
26+
- (crons) Add owner field to MonitorConfig by @julwhitney13 in [#5610](https://github.com/getsentry/sentry-python/pull/5610)
27+
- (otlp) Add collector_url option to OTLPIntegration by @sl0thentr0py in [#5603](https://github.com/getsentry/sentry-python/pull/5603)
28+
29+
### Bug Fixes 🐛
30+
31+
- (ai) Truncate list-based message content in AI monitoring by @ericapisani in [#5631](https://github.com/getsentry/sentry-python/pull/5631)
32+
- (anthropic) Close span on `GeneratorExit` by @alexander-alderman-webb in [#5643](https://github.com/getsentry/sentry-python/pull/5643)
33+
- (celery) Propagate user-set headers by @sentrivana in [#5581](https://github.com/getsentry/sentry-python/pull/5581)
34+
- (langchain) Wrap finish_reason in array for gen_ai span attribute by @ericapisani in [#5666](https://github.com/getsentry/sentry-python/pull/5666)
35+
- (logging) Fix deadlock in log batcher by @sentrivana in [#5684](https://github.com/getsentry/sentry-python/pull/5684)
36+
- (profiler) Prevent buffer race condition during rapid start/stop cycles by @ericapisani in [#5622](https://github.com/getsentry/sentry-python/pull/5622)
37+
- (utils) Avoid double serialization of strings in safe_serialize by @ericapisani in [#5587](https://github.com/getsentry/sentry-python/pull/5587)
38+
- Enable unused import ruff check and fix unused imports by @sentrivana in [#5652](https://github.com/getsentry/sentry-python/pull/5652)
39+
40+
### Documentation 📚
41+
42+
- (openai-agents) Remove inapplicable comment by @alexander-alderman-webb in [#5495](https://github.com/getsentry/sentry-python/pull/5495)
43+
- Add AGENTS.md by @sentrivana in [#5579](https://github.com/getsentry/sentry-python/pull/5579)
44+
- Add `set_attribute` example to changelog by @sentrivana in [#5578](https://github.com/getsentry/sentry-python/pull/5578)
45+
46+
### Internal Changes 🔧
47+
48+
#### Anthropic
49+
50+
- Check system and response ID attributes on spans created by `stream()` by @alexander-alderman-webb in [#5665](https://github.com/getsentry/sentry-python/pull/5665)
51+
- Skip accumulation logic for unexpected types in streamed response by @alexander-alderman-webb in [#5564](https://github.com/getsentry/sentry-python/pull/5564)
52+
- Factor out streamed result handling by @alexander-alderman-webb in [#5563](https://github.com/getsentry/sentry-python/pull/5563)
53+
- Stream valid JSON by @alexander-alderman-webb in [#5641](https://github.com/getsentry/sentry-python/pull/5641)
54+
- Stop mocking response iterator by @alexander-alderman-webb in [#5573](https://github.com/getsentry/sentry-python/pull/5573)
55+
56+
#### Openai Agents
57+
58+
- Do not fail on new tool fields by @alexander-alderman-webb in [#5625](https://github.com/getsentry/sentry-python/pull/5625)
59+
- Stop expecting a specific function name by @alexander-alderman-webb in [#5623](https://github.com/getsentry/sentry-python/pull/5623)
60+
- Set streaming header when library uses `with_streaming_response()` by @alexander-alderman-webb in [#5583](https://github.com/getsentry/sentry-python/pull/5583)
61+
- Replace mocks with `httpx` for streamed responses by @alexander-alderman-webb in [#5580](https://github.com/getsentry/sentry-python/pull/5580)
62+
- Replace mocks with `httpx` in non-MCP tool tests by @alexander-alderman-webb in [#5602](https://github.com/getsentry/sentry-python/pull/5602)
63+
- Replace mocks with `httpx` in MCP tool tests by @alexander-alderman-webb in [#5605](https://github.com/getsentry/sentry-python/pull/5605)
64+
- Replace mocks with `httpx` in handoff tests by @alexander-alderman-webb in [#5604](https://github.com/getsentry/sentry-python/pull/5604)
65+
- Replace mocks with `httpx` in API error test by @alexander-alderman-webb in [#5601](https://github.com/getsentry/sentry-python/pull/5601)
66+
- Replace mocks with `httpx` in non-error single-response tests by @alexander-alderman-webb in [#5600](https://github.com/getsentry/sentry-python/pull/5600)
67+
- Remove test for unreachable state by @alexander-alderman-webb in [#5584](https://github.com/getsentry/sentry-python/pull/5584)
68+
- Expect `namespace` tool field for new `openai` versions by @alexander-alderman-webb in [#5599](https://github.com/getsentry/sentry-python/pull/5599)
69+
70+
#### Other
71+
72+
- (graphene) Simplify span creation by @sentrivana in [#5648](https://github.com/getsentry/sentry-python/pull/5648)
73+
- (httpx) Resolve type checking failures by @alexander-alderman-webb in [#5626](https://github.com/getsentry/sentry-python/pull/5626)
74+
- (pyramid) Support alpha suffixes in version parsing by @alexander-alderman-webb in [#5618](https://github.com/getsentry/sentry-python/pull/5618)
75+
- (rust) Don't implement separate scope management by @sentrivana in [#5639](https://github.com/getsentry/sentry-python/pull/5639)
76+
- (strawberry) Simplify span creation by @sentrivana in [#5647](https://github.com/getsentry/sentry-python/pull/5647)
77+
- 🤖 Update test matrix with new releases (03/16) by @github-actions in [#5671](https://github.com/getsentry/sentry-python/pull/5671)
78+
- Remove custom warden action by @sentrivana in [#5653](https://github.com/getsentry/sentry-python/pull/5653)
79+
- Add `httpx` to linting requirements by @alexander-alderman-webb in [#5644](https://github.com/getsentry/sentry-python/pull/5644)
80+
- Remove CodeQL action by @sentrivana in [#5616](https://github.com/getsentry/sentry-python/pull/5616)
81+
- Normalize dots in package names in `populate_tox.py` by @alexander-alderman-webb in [#5574](https://github.com/getsentry/sentry-python/pull/5574)
82+
- Do not run actions on `potel-base` by @sentrivana in [#5614](https://github.com/getsentry/sentry-python/pull/5614)
83+
784
## 2.54.0
885

986
### New Features ✨
@@ -14,17 +91,17 @@ This is an alpha release for internal testing.
1491

1592
```python
1693
import sentry_sdk
17-
94+
1895
sentry_sdk.init(...)
19-
96+
2097
sentry_sdk.set_attribute("my.attribute", "my value")
21-
98+
2299
# This metric will have "my.attribute" set
23100
sentry_sdk.metrics.count("counter", 1)
24-
101+
25102
# Remove the attribute
26103
sentry_sdk.remove_attribute("my.attribute")
27-
104+
28105
# This log will not have "my.attribute" set
29106
sentry_sdk.logger.info("An info log")
30107
```

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Please search the [issue tracker](https://github.com/getsentry/sentry-python/iss
1717

1818
We will review your pull request as soon as possible. Thank you for contributing!
1919

20+
### AI Use
21+
22+
You are welcome to use whatever tools you prefer for making a contribution. However, any changes you propose have to be reviewed and tested by you, a human, first, before you submit a pull request with them for the Sentry team to review. If we feel like that didn't happen, we will close the PR outright. For example, we won't review visibly AI-generated PRs from an agent instructed to look for and "fix" open issues in the repo.
23+
2024
## Development Environment
2125

2226
### Set up Python

requirements-testing.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ tomli;python_version<"3.11" # Only needed for pytest on Python < 3.11
44
pytest-cov
55
pytest-forked
66
pytest-localserver
7+
pytest-timeout
78
pytest-watch
89
jsonschema
910
executing

scripts/populate_tox/package_dependencies.jsonl

Lines changed: 8 additions & 8 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)