Releases: getsentry/sentry-python
Releases Β· getsentry/sentry-python
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
2.51.0
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
- feat(integrations): OpenAI/OpenAI Agents detect and report the time to first token metric (TTFT) as
gen_ai.response.time_to_first_tokenby @constantinius in #5348
Openai Agents
- feat(openai-agents): Set system instruction attribute on
gen_ai.chatspans by @alexander-alderman-webb in #5370 - feat(openai-agents): Set system instruction attribute by @alexander-alderman-webb in #5355
- feat(integrations): openai-agents streaming support by @constantinius in #5291
Other
- feat(ai): Add original input length meta attribute by @alexander-alderman-webb in #5375
- feat(anthropic): Set system instruction attribute by @alexander-alderman-webb in #5353
- feat(asyncio): Allow to turn task spans off by @sentrivana in #5367
- feat(gen_ai): add function
set_conversation_idand managing functions on the Scope and apply it on the Span on.finish()by @constantinius in #5362 - feat(google-genai): Set system instruction attribute by @alexander-alderman-webb in #5354
- feat(langchain): Set system instruction attribute by @alexander-alderman-webb in #5357
- feat(pydantic-ai): Set system instruction attribute by @alexander-alderman-webb in #5356
- 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
Internal Changes π§
- ci(release): Fix changelog-preview permissions by @BYK in #5368
- ref: Replace
set_data_normalized()withSpan.set_data()for system instructions by @alexander-alderman-webb in #5374 - ci: Fix path in AI integration tests by @alexander-alderman-webb in #5347
2.51.0a1
New Features β¨
Integrations
- feat(integrations): OpenAI/OpenAI Agents detect and report the time to first token metric (TTFT) as
gen_ai.response.time_to_first_tokenby @constantinius in #5348 - feat(integrations): openai-agents streaming support by @constantinius in #5291
Other
- feat(anthropic): Set system instruction attribute by @alexander-alderman-webb in #5353
- feat(asyncio): Allow to turn task spans off by @sentrivana in #5367
- feat(gen_ai): add function
set_conversation_idand managing functions on the Scope and apply it on the Span on.finish()by @constantinius in #5362 - feat(google-genai): Set system instruction attribute by @alexander-alderman-webb in #5354
- feat(langchain): Set system instruction attribute by @alexander-alderman-webb in #5357
- feat(openai-agents): Set system instruction attribute by @alexander-alderman-webb in #5355
- feat(pydantic-ai): Set system instruction attribute by @alexander-alderman-webb in #5356
Internal Changes π§
- ci(release): Fix changelog-preview permissions by @BYK in #5368
- ci: Fix path in AI integration tests by @alexander-alderman-webb in #5347
Other
- [do not merge] feat: Span streaming & new span API by @sentrivana in #5317
2.50.0
New Features β¨
Ai
- feat(ai): add cache writes for gen_ai by @shellmayr in #5319
- feat(ai): add parse_data_uri function to parse a data URI by @constantinius in #5311
Other
-
feat(asyncio): Add on-demand way to enable AsyncioIntegration by @sentrivana in #5288
You can now enable the
AsyncioIntegrationon demand, after callingsentry_sdk.init(). This is useful in scenarios where you don't have
the event loop running early on, or when you need to instrument multiple event loops.
import sentry_sdk
from sentry_sdk.integrations.asyncio import enable_asyncio_integration
# Initializing the SDK as early as possible, when there is no event loop yet
sentry_sdk.init(
...
# No AsyncioIntegration in explicitly provided `integrations`
)
async def main():
enable_asyncio_integration() # instruments the current event loop
# ...your code...- feat(openai-agents): Inject propagation headers for
HostedMCPToolby @alexander-alderman-webb in #5297 - feat(stdlib): Handle proxy tunnels in httlib integration by @sl0thentr0py in #5303
- feat: Support array types for logs and metrics attributes by @alexander-alderman-webb in #5314
Bug Fixes π
Integrations
- fix(integrations): google genai report image inputs by @constantinius in #5337
- fix(integrations): google-genai: reworked
gen_ai.request.messagesextraction from parameters by @constantinius in #5275 - fix(integrations): pydantic-ai: properly format binary input message parts to be conformant with the
gen_ai.request.messagesstructure by @constantinius in #5251 - fix(integrations): Anthropic: add content transformation for images and documents by @constantinius in #5276
- fix(integrations): langchain add multimodal content transformation functions for images, audio, and files by @constantinius in #5278
Litellm
- fix(litellm): fix
gen_ai.request.messagesto be as expected by @constantinius in #5255 - fix(litellm): Guard against module shadowing by @alexander-alderman-webb in #5249
Other
- fix(ai): redact message parts content of type blob by @constantinius in #5243
- fix(clickhouse): Guard against module shadowing by @alexander-alderman-webb in #5250
- fix(gql): Revert signature change of patched gql.Client.execute by @alexander-alderman-webb in #5289
- fix(grpc): Derive interception state from channel fields by @alexander-alderman-webb in #5302
- fix(pure-eval): Guard against module shadowing by @alexander-alderman-webb in #5252
- fix(ray): Guard against module shadowing by @alexander-alderman-webb in #5254
- fix(threading): Handle channels shadowing by @sentrivana in #5299
- fix(typer): Guard against module shadowing by @alexander-alderman-webb in #5253
- fix: Stop suppressing exception chains in AI integrations by @alexander-alderman-webb in #5309
- fix: Send client reports for span recorder overflow by @sentrivana in #5310
Documentation π
- docs(metrics): Remove experimental notice by @alexander-alderman-webb in #5304
- docs: Update Python versions banner in README by @sentrivana in #5287
Internal Changes π§
Fastmcp
- test(fastmcp): Narrow
AttributeErrortry-except by @alexander-alderman-webb in #5339 - test(fastmcp): Stop accessing non-existent attribute by @alexander-alderman-webb in #5338
Release
- ci(release): Bump Craft version to fix issues by @BYK in #5305
- ci(release): Switch from action-prepare-release to Craft by @BYK in #5290
Other
- chore(gen_ai): add auto-enablement for google genai by @shellmayr in #5295
- chore(repo): Add Claude Code settings with basic permissions by @philipphofmann in #5342
- ci: π€ Update test matrix with new releases (01/19) by @github-actions in #5330
- ci: Add periodic AI integration tests by @alexander-alderman-webb in #5313
- chore: Use pull_request_target for changelog preview by @BYK in #5323
- chore: add unlabeled trigger to changelog-preview by @BYK in #5315
- chore: Add type for metric units by @sentrivana in #5312
- ci: Update tox and handle generic classifiers by @sentrivana in #5306
2.49.0
New Features β¨
- feat(api): Add
Scope.set_attributeby @sentrivana in #5256
Bug Fixes π
- fix(grpc): Gate third-party imports by @alexander-alderman-webb in #5246
- fix(opentelemetry): Gate third-party imports by @alexander-alderman-webb in #5247
- fix(ray): Keep variadic kwargs last in signatures by @alexander-alderman-webb in #5244
- fix(trytond): Gate third-party imports by @alexander-alderman-webb in #5245
- Fix openai count_tokens by @sl0thentr0py in #5281
Documentation π
- docs: Fix typo in comment by @sentrivana in #5280
- docs: Fix
middleware_spansdocstring by @sentrivana in #5279
Internal Changes π§
- ref(scope): Set global attrs on global scope by @sentrivana in #5259
- chore: Ignore type migration for scripts/ and tests/ in blame by @alexander-alderman-webb in #5284
- ref: Properly override parent func by @sentrivana in #5283
- ci: Allow to use Craft's new auto-versioning by @sentrivana in #5218
- ref: Deduplicate batchers by @sentrivana in #5263
- tests: Add dedicated transport format test for metrics, logs by @sentrivana in #5264
- ci: π€ Update test matrix with new releases (01/05) by @github-actions in #5273
- tests: General logs tests should use Sentry logs API by @sentrivana in #5262
- tests: Test preserialization of attributes by @sentrivana in #5260
- ci: Unpin Pydantic 1.x version in tests by @alexander-alderman-webb in #5261
- ref: Make logs, metrics go via scope by @sentrivana in #5213
- ci: Fix failing arq, fastapi tests on 3.7; update test matrix by @sentrivana in #5258