Releases: getsentry/sentry-python
Releases Β· getsentry/sentry-python
2.54.0
New Features β¨
-
Add
set_attribute,remove_attributeto global API by @sentrivana in #5555You can now set and unset attributes on logs and metrics via top-level API. Think of it as
sentry_sdk.set_tag()for attribute-based telemetry. Other event types (transactions, spans, errors) will be unaffected.import sentry_sdk sentry_sdk.init(...) sentry_sdk.set_attribute("my.attribute", "my value") # This metric will have "my.attribute" set sentry_sdk.metrics.count("counter", 1) # Remove the attribute sentry_sdk.remove_attribute("my.attribute") # This log will not have "my.attribute" set sentry_sdk.logger.info("An info log")
Bug Fixes π
Openai
- Attach response model with streamed Completions API by @alexander-alderman-webb in #5557
- Attach response model with streamed Responses API by @alexander-alderman-webb in #5554
- Avoid consuming iterables passed to the Completions API by @alexander-alderman-webb in #5489
- Avoid consuming iterables passed to the Embeddings API by @alexander-alderman-webb in #5491
Other
- (anthropic) Fix token accounting by @shellmayr in #5490
- (google-genai) Remove agent spans for simple requests by @alexander-alderman-webb in #5443
- (grpc) Read method from handler_call_details for grpcio >= 1.76 compat by @yeung108 in #5521
- (httpx) Correctly append baggage in async client by @sentrivana in #5530
- (pydantic-ai) Adapt to missing
ToolManager._call_toolby @sentrivana in #5522 - (utils) Use HEROKU_BUILD_COMMIT env var for default release by @ericapisani in #5499
- (wsgi) Do not wrap file responses when uWSGI offload-threads is enabled by @ericapisani in #5556
Documentation π
- Add troubleshooting note for editable installs with uWSGI by @ericapisani in #5552
- Add debugging advice by @alexander-alderman-webb in #5517
- New integration guide by @alexander-alderman-webb in #5476
Internal Changes π§
Agents
- Add security-review skill to agent configuration by @ericapisani in #5498
- Add sentry skills to be used by warden in CI reviews by @ericapisani in #5485
Openai
- Only handle streamed results when applicable by @alexander-alderman-webb in #5553
- Extract input in API-specific functions by @alexander-alderman-webb in #5546
- Separate output handling by @alexander-alderman-webb in #5543
Openai Agents
- Remove
set_data_normalizedfor primitive attributes by @alexander-alderman-webb in #5509 - Expect new tool fields by @alexander-alderman-webb in #5471
Other
- (ai) Add configuration for dotagents by @ericapisani in #5480
- (anthropic) Remove
set_data_normalizedfor primitive attributes by @alexander-alderman-webb in #5504 - (github) Add warden configuration by @ericapisani in #5484
- (pydantic-ai) Remove
set_data_normalizedfor thegen_ai.response.modelattribute by @alexander-alderman-webb in #5512 - (repo) Add .serena to .gitignore by @ericapisani in #5464
- Updated codecov.yml by @MathurAditya724 in #5571
- π€ Update test matrix with new releases (02/24) by @github-actions in #5524
- π€ Update test matrix with new releases (02/23) by @github-actions in #5503
- π€ Update test matrix with new releases (02/19) by @github-actions in #5483
- π€ Update test matrix with new releases (02/18) by @github-actions in #5475
2.52.0a7
This is an alpha release for internal testing.
2.52.0a6
This is an alpha release for internal testing.
2.53.0
Bug Fixes π
Openai Agents
- Patch
execute_final_output()functions following library refactor by @alexander-alderman-webb in #5453 - Patch
execute_handoffs()functions following library refactor by @alexander-alderman-webb in #5452 - Patch
run_single_turn_streamed()functions following library refactor by @alexander-alderman-webb in #5451 - Patch
run_single_turn()functions following library refactor by @alexander-alderman-webb in #5450 - Patch models functions following library refactor by @alexander-alderman-webb in #5449
- Patch tool functions following library refactor by @alexander-alderman-webb in #5445
Other
- Close the connection we're reading driver_type from by @sentrivana in #5427
Documentation π
- Document
openai-agentscontrol-flow by @alexander-alderman-webb in #5447
Internal Changes π§
Openai Agents
- New tool field and library error log by @alexander-alderman-webb in #5454
- Avoid calling SDK-internal functions by @alexander-alderman-webb in #5437
Other
- Improve Craft config with title stripping and artifact filtering by @BYK in #5444
- Use fixed clickhouse action, remove aws-sam-cli dependency by @sentrivana in #5457
- Remove references to unsupported attribute types by @alexander-alderman-webb in #5425
- Pin setuptools for linting and chalice tests by @alexander-alderman-webb in #5438
2.52.0a5
Documentation π
- Document
openai-agentscontrol-flow by @alexander-alderman-webb in #5447
Internal Changes π§
- (ci) Improve Craft config with title stripping and artifact filtering by @BYK in #5444
- (openai-agents) Avoid calling SDK-internal functions by @alexander-alderman-webb in #5437
- Remove references to unsupported attribute types by @alexander-alderman-webb in #5425
Other
- [do not merge] feat: Span streaming & new span API by @sentrivana in #5317
2.52.0a4
- [do not merge] feat: Span streaming & new span API by @sentrivana in #5317
2.52.0a3
New Features β¨
- feat(integration): add
gen_ai.conversation.idif available by @constantinius in #5307
Bug Fixes π
Mcp
- fix(mcp): Nest MCP spans under HTTP transactions by @alexander-alderman-webb in #5292
- fix(mcp): Handle all awaitable return types by @alexander-alderman-webb in #5415
Span Streaming
- fix(span-streaming): Always preserialize attributes by @sentrivana in #5407
- fix(span-streaming): Warn about thread usage if any batcher is active by @sentrivana in #5408
Other
- fix(anthropic): Token reporting by @alexander-alderman-webb in #5403
- fix(celery): Close the connection we're reading driver_type from by @sentrivana in #5427
- fix(google-genai): Token reporting by @alexander-alderman-webb in #5404
- fix(openai): Token reporting by @alexander-alderman-webb in #5406
- fix(openai-agents): Inject propagation headers for
HostedMCPToolwhen streaming by @alexander-alderman-webb in #5405 - fix: Fix list attribute type by @sentrivana in #5417
- fix: Adapt to new packaging in toxgen by @sentrivana in #5382
Internal Changes π§
Fastmcp
- test(fastmcp): Wrap prompt in
Messageby @alexander-alderman-webb in #5411 - test(fastmcp): Remove
test_fastmcp_without_request_context()by @alexander-alderman-webb in #5412 - test(fastmcp): Use
AsyncClientfor SSE by @alexander-alderman-webb in #5400 - test(fastmcp): Use
TestClientfor Streamable HTTP by @alexander-alderman-webb in #5384 - test(fastmcp): Simulate stdio transport with memory streams by @alexander-alderman-webb in #5333
Mcp
- test(mcp): Use
AsyncClientfor SSE by @alexander-alderman-webb in #5396 - test(mcp): Use
TestClientfor Streamable HTTP by @alexander-alderman-webb in #5383 - test(mcp): Remove unused stdio helpers by @alexander-alderman-webb in #5409
Other
- ci: Pin setuptools for linting and chalice tests by @alexander-alderman-webb in #5438
- ci: Fix lint step by @sentrivana in #5418
- ci: π€ Update test matrix with new releases (02/02) by @github-actions in #5413
- ci: Update tox and pin packaging version for tox by @alexander-alderman-webb in #5381
Other
- [do not merge] feat: Span streaming & new span API by @sentrivana in #5317
- Update CHANGELOG.md by @alexander-alderman-webb in bcec5780
- release: 2.52.0 by @alexander-alderman-webb in 3d2154ce
- Revert "feat(ai): Add original input length meta attribute (#5375)" by @alexander-alderman-webb in #5419
2.52.0
New Features β¨
Other
- feat(integration): add
gen_ai.conversation.idif available by @constantinius in #5307
Bug Fixes π
Google Genai
- fix(google-genai): Token reporting by @alexander-alderman-webb in #5404
- fix(google-genai): deactivate google genai when langchain is used by @shellmayr in #5389
Mcp
- fix(mcp): Nest MCP spans under HTTP transactions by @alexander-alderman-webb in #5292
- fix(mcp): Handle all awaitable return types by @alexander-alderman-webb in #5415
Other
- fix(anthropic): Token reporting by @alexander-alderman-webb in #5403
- fix(arq): handle settings_cls passed as keyword argument by @nc9 in #5393
- fix(dramatiq): cleanup isolated scope and transaction when message is skipped by @frankie567 in #5346
- fix(openai): Token reporting by @alexander-alderman-webb in #5406
- fix(openai-agents): Inject propagation headers for
HostedMCPToolwhen streaming by @alexander-alderman-webb in #5405 - fix: Fix list attribute type by @sentrivana in #5417
- fix: Adapt to new packaging in toxgen by @sentrivana in #5382
Internal Changes π§
Fastmcp
- test(fastmcp): Wrap prompt in
Messageby @alexander-alderman-webb in #5411 - test(fastmcp): Remove
test_fastmcp_without_request_context()by @alexander-alderman-webb in #5412 - test(fastmcp): Use
AsyncClientfor SSE by @alexander-alderman-webb in #5400 - test(fastmcp): Use
TestClientfor Streamable HTTP by @alexander-alderman-webb in #5384 - test(fastmcp): Simulate stdio transport with memory streams by @alexander-alderman-webb in #5333
Mcp
- test(mcp): Use
AsyncClientfor SSE by @alexander-alderman-webb in #5396 - test(mcp): Use
TestClientfor Streamable HTTP by @alexander-alderman-webb in #5383 - test(mcp): Remove unused stdio helpers by @alexander-alderman-webb in #5409
- test(mcp): Simulate stdio transport with memory streams by @alexander-alderman-webb in #5329
Other
- ci: Fix lint step by @sentrivana in #5418
- ci: π€ Update test matrix with new releases (02/02) by @github-actions in #5413
- ci: Update tox and pin packaging version for tox by @alexander-alderman-webb in #5381
- ci: migration to the new codecov action by @MathurAditya724 in #5392
Other
- Revert "feat(ai): Add original input length meta attribute (#5375)" by @alexander-alderman-webb in #5419
2.52.0a2
New Features β¨
Span Streaming
- feat(span-streaming): Add spans to telemetry pipeline, add span name and attributes (3) by @sentrivana in #5399
- feat(span-streaming): Add span batcher (2) by @sentrivana in #5398
Internal Changes π§
- test(mcp): Simulate stdio transport with memory streams by @alexander-alderman-webb in #5329
Other
- [do not merge] feat: Span streaming & new span API by @sentrivana in #5317
2.52.0a1
New Features β¨
Openai
- feat(openai): Set system instruction attribute for Responses API by @alexander-alderman-webb in #5376
- feat(openai): Set system instruction attribute for Completions API by @alexander-alderman-webb in #5358
Other
- feat(ai): Add original input length meta attribute by @alexander-alderman-webb in #5375
- feat(openai-agents): Set system instruction attribute on
gen_ai.chatspans by @alexander-alderman-webb in #5370 - feat(span-streaming): Add experimental
trace_lifecycleswitch (1) by @sentrivana in #5397 - feat(transport): Report 413 responses for oversized envelopes by @alexander-alderman-webb in #5380
Bug Fixes π
- fix(ai): Keep single content input message by @alexander-alderman-webb in #5345
- fix(arq): handle settings_cls passed as keyword argument by @nc9 in #5393
- fix(dramatiq): cleanup isolated scope and transaction when message is skipped by @frankie567 in #5346
- fix(google-genai): deactivate google genai when langchain is used by @shellmayr in #5389
Internal Changes π§
- ci: migration to the new codecov action by @MathurAditya724 in #5392
- ref: Replace
set_data_normalized()withSpan.set_data()for system instructions by @alexander-alderman-webb in #5374
Other
- [do not merge] feat: Span streaming & new span API by @sentrivana in #5317
- Update CHANGELOG.md by @alexander-alderman-webb in 8517eb0a
- release: 2.51.0 by @alexander-alderman-webb in 93e89e4c