Skip to content

Releases: getsentry/sentry-python

2.64.0

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 30 Jun 08:14

The SDK now extracts all gen_ai spans out of a transaction and sends them as v2 envelope items by default. This prevents gen_ai spans from being dropped when the transaction payload exceeds size limits. Because they are no longer constrained by transaction size limits, AI message data is also no longer truncated. To keep the previous behavior, set stream_gen_ai_spans=False.

Self-hosted Sentry users should opt out with stream_gen_ai_spans=False, since streamed gen_ai spans may not be ingested by their Sentry instance.

Bug Fixes πŸ›

Documentation πŸ“š

Internal Changes πŸ”§

Other

2.63.0

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 16 Jun 12:46

Bug Fixes πŸ›

Fastapi

  • Prevent double wrapping of sync handlers on FastAPI >= 0.137 by @jhonny-on in #6569
  • Use effective_route_context path for prefixed routers by @ericapisani in #6572

Other

Internal Changes πŸ”§

2.62.0

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 08 Jun 13:24
0bac65a

New Features ✨

  • Add integration for aiomysql by @tonal in #4703

    We're adding support for the aiomysql package. To enable the integration, add it to your integrations list:

    import sentry_sdk
    from sentry_sdk.integrations.aiomysql import AioMySQLIntegration
    
    sentry_sdk.init(
        traces_sample_rate=1.0,
        integrations=[AioMySQLIntegration()],
    )
  • Support HTTPX2 by @sentrivana in #6463

    We're adding out-of-the-box support for HTTPX2. As long as use the package, the Sentry integration
    will be enabled automatically and you should see your requests instrumented in Sentry.

    import httpx2
    import sentry_sdk
    
    sentry_sdk.init(...)
    
    with sentry_sdk.start_transaction(name="testing_sentry"):
        httpx2.get("https://sentry.io/")

Bug Fixes πŸ›

Internal Changes πŸ”§

2.61.1

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 01 Jun 07:24
5c95559

Internal Changes πŸ”§

Rq

Other

2.61.0

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 28 May 09:40
53df878

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

2.60.0

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 13 May 13:35

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

2.59.0a2

2.59.0a2 Pre-release
Pre-release

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 08 May 08:59

New Features ✨

Bug Fixes πŸ›

Openai

Other

Internal Changes πŸ”§

Openai

Other

Other

2.59.0a1

2.59.0a1 Pre-release
Pre-release

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 05 May 08:55

New Features ✨

Langchain

Other

Bug Fixes πŸ›

Httpx

Langchain

Other

Internal Changes πŸ”§

Stdlib

Other

Other

2.59.0

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 04 May 12:19
689cb97

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

2.58.0a1

2.58.0a1 Pre-release
Pre-release

Choose a tag to compare

@sentry-release-bot sentry-release-bot released this 21 Apr 08:29

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