Skip to content

Commit 183e83b

Browse files
committed
Merge origin/master into feat/async-transport
Resolve tox.ini conflict: keep both httpx-latest line from master and our anyio>=3,<5 change.
2 parents 71007ec + 48dc566 commit 183e83b

File tree

84 files changed

+4705
-1127
lines changed

Some content is hidden

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

84 files changed

+4705
-1127
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
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
token: ${{ secrets.GITHUB_TOKEN }}
3535

3636
- name: Run Python SDK Tests
37-
uses: getsentry/testing-ai-sdk-integrations@285c012e522f241581534dfc89bd99ec3b1da4f6
37+
uses: getsentry/testing-ai-sdk-integrations@6b1f51ec8af03e19087df452b426aa7e46d2b20a
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4040
with:

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323
- name: Get auth token
2424
id: token
25-
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2
25+
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v2
2626
with:
2727
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
2828
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
@@ -31,7 +31,7 @@ jobs:
3131
token: ${{ steps.token.outputs.token }}
3232
fetch-depth: 0
3333
- name: Prepare release
34-
uses: getsentry/craft@d4cfac9d25d1fc72c9241e5d22aff559a114e4e9 # v2
34+
uses: getsentry/craft@013a7b2113c2cac0ff32d5180cfeaefc7c9ce5b6 # v2
3535
env:
3636
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3737
with:

.github/workflows/update-tox.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: |
4343
COMMIT_TITLE="ci: 🤖 Update test matrix with new releases"
4444
DATE=`date +%m/%d`
45-
BRANCH_NAME="toxgen/update"
45+
BRANCH_NAME="toxgen/update-`date +%m-%d`"
4646
4747
git checkout -B "$BRANCH_NAME"
4848
git add --all
@@ -78,20 +78,21 @@ jobs:
7878
7979
// Close existing toxgen PRs as they're now obsolete
8080
81-
const { data: existingPRs } = await github.rest.pulls.list({
81+
const existingPRs = await github.paginate(github.rest.pulls.list, {
8282
owner: context.repo.owner,
8383
repo: context.repo.repo,
84-
head: `${context.repo.owner}:${branchName}`,
8584
state: 'open'
8685
});
8786
8887
for (const pr of existingPRs) {
89-
await github.rest.pulls.update({
90-
owner: context.repo.owner,
91-
repo: context.repo.repo,
92-
pull_number: pr.number,
93-
state: 'closed'
94-
})
88+
if (pr.head.ref.startsWith('toxgen/')) {
89+
await github.rest.pulls.update({
90+
owner: context.repo.owner,
91+
repo: context.repo.repo,
92+
pull_number: pr.number,
93+
state: 'closed'
94+
})
95+
}
9596
};
9697
9798
const { data: pr } = await github.rest.pulls.create({

.github/workflows/warden.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.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: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,82 @@
11
# Changelog
22

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

582
### New Features ✨

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

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

3737

0 commit comments

Comments
 (0)