releases.shpreview
Sentry/Sentry Python

Sentry Python

Mon
Wed
Fri
JunJulAugSepOctNovDecJanFebMarAprMay
Less
More
Releases13Avg4/moVersionsv2.54.0 to v2.61.0
v2.61.0
New Features ✨
  • Add server.address to transformed spans when stream_gen_ai_spans=True by @alexander-alderman-webb in #6307

  • Allow integrations to define control flow exceptions by @sentrivana in #6425

  • Disable string truncation for events by default by @alexander-alderman-webb in #6290

    Following a previous significant increase of the string truncation limit, we've now completely removed the limit by default. In case you have large strings in your events, you should now be able to see them.

    In rare cases, if you have really long strings (or a lot of them), you might see envelopes being dropped because of their size. If that happens, you can set the max_value_length init option to the previous value of 100_000:

    sentry_sdk.init(
        ...,
        max_value_length=100_000,
    )
Bug Fixes 🐛
Langchain
Openai Agents
Pydantic AI
Strawberry
Other
  • (anthropic) Do not set gen_ai.response.model to None by @alexander-alderman-webb in #6312

  • (asyncpg) Use Sentry span attribute name conventions by @ericapisani in #6306

  • (boto3) Guard setting method by @sentrivana in #6288

  • (cohere) Stop setting transaction status when child span fails by @alexander-alderman-webb in #6300

  • (google-genai) Guard against None response ID and response model by @alexander-alderman-webb in #6314

  • (huey) Fix group and chord handling in enqueue by @ericapisani in #6392

  • (integrations) Auto-wrap root gen_ai spans for openai, cohere, langgraph, huggingface_hub by @constantinius in #6285

  • (serializer) Don't call __iter__ on arbitrary sequences by @sentrivana in #6304

    Previously, we'd attempt to serialize any Sequence by walking through it by calling its __iter__ function. We've now changed the serializer to only serialize built-in sequences (like lists, tuples, and sets) to avoid triggering side-effects from custom __iter__ implementations.

    This might mean some objects might be serialized differently. If you want to continue serializing a specific custom sequence class the old way, you can register it via sentry_sdk.serializer.add_repr_sequence_type (see here).

  • Memory leak in SentrySpanProcessor by @volodkindv in #6271

Documentation 📚
Internal Changes 🔧
Langchain
Openai Agents
Pydantic Ai
Other
v2.60.0

Adds a new stream_gen_ai_spans option that controls how gen_ai spans are sent to Sentry. When set, the SDK extracts all gen_ai spans out of a transaction and sends them as v2 envelope items.

Enable this option if gen_ai spans are being dropped because the transaction payload exceeds size limits.

import sentry_sdk

sentry_sdk.init(
  dsn='https://examplePublicKey@o0.ingest.sentry.io/0',
  stream_gen_ai_spans=True,
)
New Features ✨
Bug Fixes 🐛
Openai
Other
Internal Changes 🔧
Django
Openai
Other
New Features ✨
Langchain
Other
Bug Fixes 🐛
Httpx
Langchain
Other
Internal Changes 🔧
Stdlib
Other
Other
New Features ✨
Langchain
Other
Bug Fixes 🐛

We've put additional data that might contain sensitive information, like GraphQL documents, behind the send_default_pii option.

Httpx
Langchain
Other
Internal Changes 🔧
Stdlib
Other
New Features ✨
Bug Fixes 🐛
  • (google_genai) Redact binary data in inline_data and fix multi-part message extraction by @ericapisani in #5977
  • (profiler) Stop nulling buffer on teardown by @ericapisani in #6075
Internal Changes 🔧
Anthropic
Google Genai
Langchain
Litellm
Pydantic Ai
Other
New Features ✨
Bug Fixes 🐛
Anthropic
Pydantic Ai
Other
Internal Changes 🔧
Litellm
Other
Other
  • Handle None span context in the span processor and pin tokenizers version for anthropic tests on Python 3.8 by @alexander-alderman-webb in #5967
New Features ✨
Langchain
Other
Bug Fixes 🐛
Openai
Other
Internal Changes 🔧
Ai
Langchain
Openai
Other

This is an alpha release for internal testing.

New Features ✨
Bug Fixes 🐛
Anthropic
Other
Documentation 📚
Internal Changes 🔧
Other
New Features ✨
Anthropic
Pydantic Ai
Other
Bug Fixes 🐛
Documentation 📚
Internal Changes 🔧
Anthropic
Openai Agents
Other

This is an alpha release for internal testing.

New Features ✨
  • Add set_attribute, remove_attribute to global API by @sentrivana in #5555

    You 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
Other
Documentation 📚
Internal Changes 🔧
Agents
Openai
Openai Agents
Other

This is an alpha release for internal testing.

This is an alpha release for internal testing.

Bug Fixes 🐛
Openai Agents
Other
Documentation 📚
Internal Changes 🔧
Openai Agents
Other
New Features ✨
Bug Fixes 🐛
Mcp
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
Internal Changes 🔧
Fastmcp
Mcp
Other
Other
New Features ✨
Other
Bug Fixes 🐛
Google Genai
Mcp
Other
Internal Changes 🔧
Fastmcp
Mcp
Other
Other
Last Checked
6h ago
Tracking since Jul 6, 2021