unstale

pypi / sentry-sdk

sentry-sdk

What changed in sentry-sdk 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.

69 breaking16 security19 deprecations87 new APIs and options2 performance97 behavior and defaults208 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

sentry-sdk 2490 changes

Breaking changes 68

  • Anthropic output arrays are no longer unpacked.

    2.74.0release notes

  • Exceptions raised during stream iteration are no longer swallowed.

    2.73.0release notes

  • Exceptions raised during stream iteration are no longer swallowed.

    2.73.0release notes

  • Stacktraces are no longer attached to check-ins.

    2.69.2release notes

  • This option is now a no-op. Automatic log collection is off by default; opt in using capture_sentry_logs on LoggingIntegration or LoguruIntegration.

    2.68.0release notes

  • The prompt name is no longer added to arguments.

    2.67.0release notes

  • The integration supports the MCP SDK v2 handler signature and its removal of request_ctx.

    2.64.0release notes

  • The integration gates url.full and http.query on send_default_pii.

    2.64.0release notes

  • ASGI query strings and client IP are gated behind send_default_pii.

    2.63.0release notes

  • Removes 0000 trace_id fallbacks.

    2.63.0release notes

  • The patch for Agent.run_stream_events() has been removed.

    2.61.0release notes

  • Hosted MCP tool spans are no longer created.

    2.61.0release notes

  • Invoke Agent spans no longer have tokens set.

    2.61.0release notes

  • Only built-in sequences are serialized by iteration, avoiding side effects from custom __iter__ implementations. Custom sequence classes can be registered with add_repr_sequence_type.

    2.61.0release notes

  • Span streaming sets code.namespace and code.function instead of code.function.name.

    2.59.0release notes

  • Potentially sensitive data, including GraphQL documents, is gated behind send_default_pii.

    2.59.0release notes

  • The pydantic-ai integration stops capturing internal exceptions.

    2.48.0release notes

  • Middleware spans are disabled by default in Django, Starlette, and FastAPI; set middleware_spans on the integration to capture individual spans per middleware layer.

    2.48.0release notes

  • User attributes in metrics and logs are gated behind send_default_pii.

    2.48.0release notes

  • Adds an integration that automatically sends OpenTelemetry instrumentation to Sentry's OTLP ingestion endpoint, including exporter setup, propagation, and trace/span linking.

    2.45.0release notes

  • No longer autodetects sync versus async execution and enables the sync version by default; set async_execution explicitly to enable the async version.

    2.43.0release notes

  • The callback signature changes to accept key, value, unit, and tags instead of only key and tags.

    2.0.0upgrade guide

  • Support for Celery 3.* was removed.

    2.0.0release notes

  • Support for Django 1.8, 1.9, and 1.10 was removed.

    2.0.0release notes

  • The SDK now sends all events to the /envelope API endpoint, requiring self-hosted Sentry v20.6.0 or later.

    2.0.0upgrade guiderelease notes

  • Support for Flask 0.* was removed.

    2.0.0release notes

  • Fork an isolation scope instead of cloning a Hub by passing it to the Hub constructor.

    2.0.0upgrade guide

  • Use this API to get the current scope for changes affecting a smaller unit of code, such as a span.

    2.0.0upgrade guide

  • Use this API to get the isolation scope for changes affecting a whole transaction.

    2.0.0upgrade guide

  • Support for gRPC versions below 1.39 was removed.

    2.0.0release notes

  • This option is the replacement for the removed with_locals option.

    2.0.0upgrade guide

  • Custom integrations can no longer use the install method; use setup_once instead.

    2.0.0release notes

  • This context manager forks and activates an isolation scope, providing isolation similar to the former Hub-based approach.

    2.0.0upgrade guiderelease notes

  • The API function was removed in 2.0.0; the notes state it was brought back in 2.2.0.

    2.0.0upgrade guide

  • This option is the replacement for the removed request_bodies option.

    2.0.0upgrade guide

  • The method need_code_loation was renamed to need_code_location; update calls to use the corrected spelling.

    2.0.0release notes

  • Fork the current scope with this API for a smaller, localized part of the code.

    2.0.0upgrade guide

  • The integration no longer captures errors that might happen in authenticated_userid() in a custom AuthenticationPolicy class.

    2.0.0release notes

  • Sentry Python 2.0 supports Python 3.6 and higher; users on Python 2.7 or Python 3.5 and lower must stay on 1.x.

    2.0.0upgrade guiderelease notes

  • This deprecated option was removed; use max_request_body_size instead.

    2.0.0upgrade guiderelease notes

  • Use the current scope directly to mutate a manually created transaction; mutating it later inside configure_scope no longer works.

    2.0.0release notes

  • The BackgroundWorker thread name changed from raven-sentry.BackgroundWorker to sentry-sdk.BackgroundWorker.

    2.0.0release notes

  • Integration is now an abstract base class and cannot be instantiated unless subclasses implement setup_once.

    2.0.0release notes

  • The top-level API was removed; capture_event, capture_exception, and capture_message still return the last event ID.

    2.0.0release notes

  • Metric is now an abstract base class and subclasses must implement add, serialize_value, and weight.

    2.0.0release notes

  • Scheduler is now an abstract base class and subclasses must implement setup and teardown.

    2.0.0release notes

  • The no-op method was removed, so calls to it can be deleted.

    2.0.0release notes

  • The class moved from sentry_sdk.hub to sentry_sdk.scope; update imports accordingly.

    2.0.0release notes

  • The hub parameter was removed because it is no longer necessary.

    2.0.0release notes

  • The function now takes a scope instead of a hub.

    2.0.0release notes

  • The hub parameter was removed because it is no longer necessary.

    2.0.0release notes

  • The first parameter now takes a Client instead of a Hub.

    2.0.0release notes

  • Creating transactions with Span(transaction=...) is no longer supported; use Transaction(name=...).

    2.0.0release notes

  • The method was removed; use Span.start_child instead.

    2.0.0release notes

  • The method was removed; use Transaction.start_child instead.

    2.0.0release notes

  • Transport is now an abstract base class and subclasses must implement capture_envelope.

    2.0.0release notes

  • The function now returns a two-value tuple instead of a three-value tuple; copy_context was removed.

    2.0.0release notes

  • The parameter now accepts an EndpointType enum instead of a string; the notes recommend omitting it because its default is the only possible enum value.

    2.0.0release notes

  • The method was removed.

    2.0.0release notes

  • The first parameter now takes a Client instead of a Hub.

    2.0.0release notes

  • The function moved from sentry_sdk._compat to sentry_sdk.utils; update imports accordingly.

    2.0.0release notes

  • Support for Tornado versions below 6 was removed.

    2.0.0release notes

  • The file was removed; start_child_span_decorator is now in sentry_sdk.tracing_utils.

    2.0.0release notes

  • The contents of tracing_utils_py3.py moved to tracing_utils.py, and start_child_span_decorator is now in sentry_sdk.tracing_utils.

    2.0.0release notes

  • Use this method in place of the deprecated Transport.capture_event for custom transports.

    2.0.0upgrade guide

  • Pass an isolation scope to this API to activate it as a context manager.

    2.0.0upgrade guide

  • Support for user.segment was removed from events, the trace header, and the dynamic sampling context.

    2.0.0release notes

  • This deprecated option was removed; use include_local_variables instead.

    2.0.0upgrade guiderelease notes

Security 16

  • The gql integration removes credentials and query values from the transport URL.

    2.75.0release notes

  • The scrubber now scrubs request bodies that are JSON arrays.

    2.72.0release notes

  • The clickhouse_driver breadcrumb only sets db.result when sensitive data is opted in.

    2.69.2release notes

  • The integration gates url.full, url.path, and url.query on send_default_pii.

    2.64.0release notes

  • The integration gates url.full, url.query, and url.fragment on send_default_pii.

    2.64.0release notes

  • The integration gates url.full, url.query, and url.fragment on send_default_pii.

    2.64.0release notes

  • The integration gates url.full and url.query on send_default_pii.

    2.64.0release notes

  • The integration gates url.full, url.query, and url.fragment on send_default_pii.

    2.64.0release notes

  • The integration gates url.full, url.path, and http.query on send_default_pii.

    2.64.0release notes

  • The integration gates url.full, url.path, and url.query on send_default_pii.

    2.64.0release notes

  • The integration gates url.full, url.path, and http.query on send_default_pii.

    2.64.0release notes

  • The integration guards setting method.

    2.61.0release notes

  • Binary data in inline_data is redacted, and multi-part message extraction is fixed.

    2.59.0release notes

  • Base64 data URLs in image_url content blocks are redacted.

    2.58.0release notes

  • Response extraction is guarded in the google-genai integration.

    2.57.0release notes

  • Redacts message parts whose content is of type blob.

    2.50.0release notes

Deprecations 19

  • Deprecates ai.monitoring.record_token_usage().

    2.72.0release notes

  • Deprecates the send_default_pii option.

    2.72.0release notes

  • Deprecates transaction profiling.

    2.72.0release notes

  • The enable_logs option is deprecated and will be removed in the next major release; logger.X works regardless, and auto-collection can be opted into through integration-level options.

    2.68.1release notes

  • ai_track() is deprecated.

    2.67.0release notes

  • Deprecates OpenTelemetryIntegration in favor of OTLPIntegration.

    2.62.0release notes

  • continue_from_headers is deprecated.

    2.47.0release notes

  • Deprecates the max_spans LangChain parameter.

    2.45.0release notes

  • Deprecates the description truncation option for Redis spans.

    2.45.0release notes

  • This scope API is deprecated; get the current or isolation scope depending on the intended lifetime of the change.

    2.0.0upgrade guiderelease notes

  • Setting profiler_mode through _experiments is deprecated; set it directly instead.

    2.0.0upgrade guide

  • Setting profiles_sample_rate through _experiments is deprecated; set it directly instead.

    2.0.0upgrade guide

  • Hub-based APIs are deprecated; use the new scope APIs for custom instrumentation and event-data isolation.

    2.0.0upgrade guiderelease notes

  • Hub cloning is deprecated; use isolation_scope to work with a forked scope.

    2.0.0release notes

  • This scope API is deprecated; fork the current or isolation scope depending on how long the new scope should be active.

    2.0.0upgrade guiderelease notes

  • Use the top-level API to access the current client instead of accessing it through the hub.

    2.0.0release notes

  • The propagate_hub parameter is deprecated and renamed to propagate_scope.

    2.0.0release notes

  • Transport functions are deprecated; custom transports should be implemented as sentry_sdk.transport.Transport subclasses.

    2.0.0upgrade guiderelease notes

  • This custom transport method is deprecated; use Transport.capture_envelope instead.

    2.0.0upgrade guiderelease notes

New APIs and options 87

  • Adds support for Amazon Bedrock Converse and ConverseStream APIs; the Boto3 integration is enabled automatically when boto3 is installed or can be configured explicitly.

    2.75.0release notes

  • Adds an extension skeleton for authoring Bedrock integration extensions.

    2.75.0release notes

  • Sets the input messages attribute for Bedrock requests.

    2.75.0release notes

  • Sets the request model attribute for Bedrock calls.

    2.75.0release notes

  • Records finish reasons for streamed and non-streaming Bedrock responses.

    2.75.0release notes

  • Sets the time-to-first-chunk attribute for Bedrock responses.

    2.75.0release notes

  • Sets the system instructions attribute for Bedrock requests.

    2.75.0release notes

  • Sets the tool definitions attribute for Bedrock requests.

    2.75.0release notes

  • An option was added to monitor arq cron jobs.

    2.73.0release notes

  • Attributes is now exported from the public types module.

    2.73.0release notes

  • An option was added to monitor Huey periodic tasks.

    2.73.0release notes

  • An option was added to monitor rq-scheduler jobs.

    2.73.0release notes

  • Exports DataCollectionUserOptions from sentry_sdk.types for users who need to import this type.

    2.72.0release notes

  • Inbound filters receive sentry.is_localhost across ASGI, WSGI, aiohttp, Sanic, and Tornado integrations.

    2.72.0release notes

  • Adds the ServiceExtension class to the Boto3 integration.

    2.72.0release notes

  • The TypeSafe integration records gen_ai.output.messages.

    2.71.0release notes

  • Adds integration support for system_one() patches.

    2.71.0release notes

  • Adds a TypeSafe integration that can be enabled in the sentry_sdk.init integrations list.

    2.71.0release notes

  • Adds fine-grained control over what data the SDK collects; when defined, it takes precedence over send_default_pii.

    2.70.0release notes

  • Adds a Mistral integration that patches Chat.complete and Chat.complete_async and records GenAI messages, system instructions, request parameters, and token usage.

    2.70.0release notes

  • The Django integration adds the http.route attribute.

    2.69.1release notes

  • aiohttp adds the http.route attribute.

    2.69.0release notes

  • Bottle adds the http.route attribute.

    2.69.0release notes

  • Falcon adds the http.route attribute.

    2.69.0release notes

  • FastAPI adds the http.route attribute.

    2.69.0release notes

  • Flask adds the http.route attribute.

    2.69.0release notes

  • Pyramid adds the http.route attribute.

    2.69.0release notes

  • Quart adds the http.route attribute.

    2.69.0release notes

  • Starlette adds the http.route attribute.

    2.69.0release notes

  • SpanJSON is now exported for developers to import and use.

    2.69.0release notes

  • Adds failed_request_status_codes to Django integration configuration.

    2.68.1release notes

  • Adds the capture_sentry_logs boolean option to explicitly enable automatic log collection; it defaults to False.

    2.68.0release notes

  • Adds the capture_sentry_logs boolean option to explicitly enable automatic log collection; it defaults to False.

    2.68.0release notes

  • Streaming now supports the ai_track decorator.

    2.67.0release notes

  • before_send_span is now available as a top-level option.

    2.67.0release notes

  • The DRF integration adds a span for authentication.

    2.67.0release notes

  • OpenAI spans now include this reasoning-level attribute.

    2.67.0release notes

  • A top-level set_attributes API is available.

    2.67.0release notes

  • Promoted ignore_spans to a top-level option.

    2.66.0release notes

  • Promoted trace_lifecycle to a top-level option.

    2.66.0release notes

  • Adds an aiomysql integration that can be enabled by adding AioMySQLIntegration() to the integrations list.

    2.62.0release notes

  • Adds out-of-the-box support for HTTPX2, automatically enabling the Sentry integration when the package is used.

    2.62.0release notes

  • Integrations can define control flow exceptions.

    2.61.0release notes

  • The asyncpg integration adds cursor span support by patching the BaseCursor method.

    2.60.0release notes

  • Adds a transport for debug logging of envelopes.

    2.60.0release notes

  • Enables extracting gen_ai spans from a transaction and sending them as v2 envelope items; truncation is removed when this option is enabled, helping avoid dropped spans when transaction payloads exceed size limits.

    2.60.0release notes

  • Adds async callbacks for LiteLLM.

    2.58.0release notes

  • Adds tracing instrumentation for pyreqwest.

    2.58.0release notes

  • An experimental async transport is available.

    2.57.0release notes

  • ASGI adds an option to disable suppressing chained exceptions.

    2.56.0release notes

  • Logging now has separate ignore lists for events and breadcrumbs versus Sentry logs.

    2.56.0release notes

  • Anthropic spans now include the gen_ai.response.id attribute.

    2.55.0release notes

  • Anthropic spans now include the gen_ai.system attribute.

    2.55.0release notes

  • MonitorConfig now has an owner field.

    2.55.0release notes

  • OTLPIntegration now accepts a collector_url option.

    2.55.0release notes

  • Adds a top-level API to unset attributes on logs and metrics; other event types are unaffected.

    2.54.0release notes

  • Adds a top-level API to set attributes on logs and metrics; other event types are unaffected.

    2.54.0release notes

  • The integration adds gen_ai.conversation.id when it is available.

    2.52.0release notes

  • Asyncio task spans can now be turned off.

    2.51.0release notes

  • OpenAI and OpenAI Agents detect and report the time to first token metric under this attribute.

    2.51.0release notes

  • The OpenAI Agents integration sets the system instruction attribute on gen_ai.chat spans and supports streaming.

    2.51.0release notes

  • AI instrumentation adds metadata for the original input length.

    2.51.0release notes

  • The Pydantic AI integration sets the system instruction attribute.

    2.51.0release notes

  • Adds set_conversation_id and conversation ID management functions on Scope; the conversation ID is applied to the Span on finish.

    2.51.0release notes

  • Enables AsyncioIntegration on demand after sentry_sdk.init(), including when the event loop is not running during initialization or when instrumenting multiple event loops.

    2.50.0release notes

  • Adds cache writes for gen_ai.

    2.50.0release notes

  • Adds a function to parse a data URI.

    2.50.0release notes

  • Adds Scope.set_attribute for setting an attribute on a scope.

    2.49.0release notes

  • OTLP can optionally capture exceptions recorded through OpenTelemetry's Span.record_exception API.

    2.48.0release notes

  • OTLPIntegration implements a new Propagator.inject method.

    2.48.0release notes

  • LangGraph invocation spans now include a response model attribute.

    2.48.0release notes

  • AI integrations can truncate a single message.

    2.48.0release notes

  • LangGraph invocation spans now include usage attributes.

    2.48.0release notes

  • The GoogleGenAI integration now supports embed_content methods.

    2.47.0release notes

  • Support for org_id is added.

    2.47.0release notes

  • Strict trace continuation is implemented.

    2.47.0release notes

  • Instrumentation is added for embedding functions across various backends.

    2.46.0release notes

  • Adds support for external_propagation_context.

    2.44.0release notes

  • Allows new integration setup on the instance with config options.

    2.44.0release notes

  • Adds the ability to auto-deactivate lower-level integrations based on a map.

    2.44.0release notes

  • Pass async_execution=True to StrawberryIntegration to enable its async version.

    2.43.0release notes

  • Adds support for LangChain v1.

    2.43.0release notes

  • Adds an integration for the Python MCP SDK.

    2.43.0release notes

  • Adds the Pydantic AI integration, allowing AI calls to be observed in Sentry AI dashboards.

    2.43.0release notes

  • Adds a Google GenAI integration for observing AI calls in Sentry AI dashboards.

    2.42.0release notes

  • A new context manager forks the necessary scopes for custom instrumentation, replacing deprecated push_scope usage.

    2.0.0release notes

  • The top-level API lets the SDK handle which scope receives the data, rather than requiring manual mutation through scope.set_tag().

    2.0.0upgrade guide

Performance 2

  • AWS Lambda path-style handlers are loaded once instead of on every invocation.

    2.75.0release notes

  • Log records are no longer formatted when Sentry logs are off.

    2.69.2release notes

Behavior and default changes 95

  • Sets the output messages attribute for streamed and non-streaming Bedrock responses.

    2.75.0release notes

  • Records inferenceConfig parameters for Bedrock requests.

    2.75.0release notes

  • Marks @monitor jobs so scheduler integrations skip them.

    2.75.0release notes

  • Anthropic nonstreaming output now records reasoning parts.

    2.74.0release notes

  • Anthropic streaming output now records reasoning parts.

    2.74.0release notes

  • Adds common OpenTelemetry AWS client attributes to Boto3 instrumentation.

    2.72.0release notes

  • Adds response, retry, and error span attributes for Boto3 instrumentation.

    2.72.0release notes

  • Boto3 tracing now covers the complete botocore client-call lifecycle.

    2.72.0release notes

  • Returns None when capture_checkin sends nothing.

    2.72.0release notes

  • The TypeSafe integration records gen_ai.input.messages.

    2.71.0release notes

  • The TypeSafe integration records gen_ai.response.model.

    2.71.0release notes

  • The TypeSafe integration sets token usage attributes.

    2.71.0release notes

  • Breadcrumbs are set in the streaming trace lifecycle.

    2.69.0release notes

  • The httpx and httpx2 integrations always capture a breadcrumb.

    2.69.0release notes

  • MCP and LangChain add a mechanism to captured exceptions.

    2.69.0release notes

  • SQLAlchemy span data supports more database system names.

    2.69.0release notes

  • Starlette uses the url transaction source for host routing.

    2.69.0release notes

  • This option is now a no-op, so metrics emitted using the metrics API will be emitted regardless of its value.

    2.68.0release notes

  • LangChain records cached token usage attributes.

    2.67.0release notes

  • Pydantic AI records output messages, including ThinkingPart.

    2.67.0release notes

  • OpenAI Responses API spans now set this attribute.

    2.67.0release notes

  • OpenAI Chat Completions API spans now set this attribute.

    2.67.0release notes

  • The OpenAI Agents integration now sets this attribute.

    2.67.0release notes

  • The batcher can trigger a global flush based on summed size estimates.

    2.67.0release notes

  • The batcher adds a hard limit on spans.

    2.67.0release notes

  • LangChain records reasoning token usage.

    2.67.0release notes

  • sentry-trace now takes precedence over baggage.

    2.67.0release notes

  • The span attribute now includes the query string and fragment.

    2.67.0release notes

  • Huey consumer spans now set the messaging.destination.name attribute.

    2.65.0release notes

  • Huey producer spans now set the messaging.destination.name attribute.

    2.65.0release notes

  • arq consumer spans now set the messaging.destination.name attribute.

    2.65.0release notes

  • Dramatiq consumer spans now set the messaging.destination.name attribute.

    2.65.0release notes

  • RQ consumer spans now set the messaging.destination.name attribute.

    2.65.0release notes

  • When multiple sentry-trace headers are supplied, tracing now uses the first one.

    2.65.0release notes

  • set_user now drops user attribute values that are None.

    2.65.0release notes

  • Gen AI spans are streamed as v2 envelope items by default, avoiding transaction-size drops and truncation of AI message data. Set this to False to restore previous behavior or for self-hosted Sentry instances that may not ingest streamed spans.

    2.64.0release notes

  • Sets user.ip_address on telemetry when it is present.

    2.63.0release notes

  • The integration uses Sentry span attribute name conventions.

    2.61.0release notes

  • String truncation is disabled by default. Set max_value_length to 100_000 to restore the previous limit if large envelopes are dropped.

    2.61.0release notes

  • Root gen_ai spans are automatically wrapped for openai, cohere, langgraph, and huggingface_hub.

    2.61.0release notes

  • Transformed spans include server.address when stream_gen_ai_spans=True.

    2.61.0release notes

  • The integration passes along the conversation ID for OpenAI responses calls.

    2.60.0release notes

  • Filtered fields receive substitute values in span-streaming mode.

    2.60.0release notes

  • The stdlib integration instruments response body reads for chunked HTTP responses.

    2.60.0release notes

  • Database integration spans now include db.driver.name.

    2.59.0release notes

  • FastAPI supports span streaming in active thread tracking.

    2.59.0release notes

  • Langchain chat and tool spans record the agent name as gen_ai.agent.name.

    2.59.0release notes

  • Langchain instrumentation records run_name as gen_ai.function_id on invoke-agent, tool, chat-model, and text-completion spans.

    2.59.0release notes

  • The async gRPC server interceptor now adds isolation_scope.

    2.59.0release notes

  • Langchain AI provider detection now extends beyond OpenAI and Anthropic.

    2.57.0release notes

  • LLM spans now use gen_ai.generate_text as their operation.

    2.57.0release notes

  • LLM spans now set gen_ai.operation.name.

    2.57.0release notes

  • LLM spans now set gen_ai.pipeline.name.

    2.57.0release notes

  • The streaming attribute is now always set for OpenAI Responses.

    2.57.0release notes

  • The streaming attribute is now always set for OpenAI Completions.

    2.57.0release notes

  • The Responses API now uses max_output_tokens.

    2.57.0release notes

  • List-based message content is now truncated in AI monitoring.

    2.55.0release notes

  • Pydantic AI execute_tool spans now include the tool description.

    2.55.0release notes

  • Anthropic AI monitoring spans now record finish reasons.

    2.55.0release notes

  • Pydantic AI span instrumentation now supports ImageUrl content.

    2.55.0release notes

  • Asynchronous Anthropic messages.stream() now emits gen_ai.chat spans.

    2.55.0release notes

  • Synchronous Anthropic messages.stream() now emits AI Client Spans.

    2.55.0release notes

  • Removes agent spans for simple requests.

    2.54.0release notes

  • Uses HEROKU_BUILD_COMMIT as the default release value.

    2.54.0release notes

  • Attaches the response model for streamed Completions API responses.

    2.54.0release notes

  • Attaches the response model for streamed Responses API responses.

    2.54.0release notes

  • The transport reports 413 responses for oversized envelopes.

    2.51.0release notes

  • The Anthropic integration sets the system instruction attribute.

    2.51.0release notes

  • The Google GenAI integration sets the system instruction attribute.

    2.51.0release notes

  • The LangChain integration sets the system instruction attribute.

    2.51.0release notes

  • The OpenAI integration sets the system instruction attribute for the Responses and Completions APIs.

    2.51.0release notes

  • Injects propagation headers for HostedMCPTool.

    2.50.0release notes

  • Supports array types for logs and metrics attributes.

    2.50.0release notes

  • The release check now recognizes the K_REVISION environment variable exposed by Cloud Run.

    2.48.0release notes

  • A span is now created around Django's Task.enqueue.

    2.48.0release notes

  • Starlette sets the transaction name when middleware spans are disabled.

    2.48.0release notes

  • The SDK now records discarded log bytes.

    2.47.0release notes

  • The Django integration now instruments database commits.

    2.47.0release notes

  • The Django integration now instruments database rollbacks.

    2.47.0release notes

  • Long messages are truncated by the OpenAI Agents integration.

    2.47.0release notes

  • Chat and invoke_agent spans now report usage and response model.

    2.47.0release notes

  • The integration now reports token usage and response model for invoke_agent spans.

    2.47.0release notes

  • Adds MCP SDK, Pydantic AI, and OpenAI Agents to the integrations enabled automatically.

    2.45.0release notes

  • The Loguru integration captures extra data.

    2.45.0release notes

  • Adds context management for invoke_agent spans.

    2.45.0release notes

  • Metrics now include server.address.

    2.45.0release notes

  • Makes the before_send_metric option non-experimental.

    2.44.0release notes

  • Makes the enable_metrics option non-experimental.

    2.44.0release notes

  • Adds a hard limit to log batches.

    2.44.0release notes

  • Adds a hard limit to metrics batches.

    2.44.0release notes

  • Enables HTTP request code origin by default.

    2.43.0release notes

  • Officially supports Python 3.14 and runs integration tests on it.

    2.43.0release notes

  • Slow outgoing HTTP requests now include source information.

    2.42.0release notes

  • Integrations for Ariadne, ARQ, asyncpg, Chalice, clickhouse-driver, GQL, Graphene, huey, Loguru, PyMongo, Quart, Starlite, and Strawberry are activated automatically when their packages are detected.

    2.0.0release notes

  • This option can now be set directly instead of through _experiments.

    2.0.0upgrade guiderelease notes

Fixes and other changes 203

  • Sets token attributes for streamed and non-streaming Bedrock responses.

    2.75.0release notes

  • Preserves caches when using --only and --skip.

    2.75.0release notes

  • aiohttp instrumentation leaves an existing baggage header unchanged.

    2.74.0release notes

  • The boto3 integration adapts to botocore no longer signing baggage.

    2.74.0release notes

  • Serialization drops the trailing comma when baggage has no third-party items.

    2.74.0release notes

  • Sampling respects the incoming sample rate unless it is explicitly overridden.

    2.74.0release notes

  • Typesafe handling for inline images is added.

    2.74.0release notes

  • Falcon instrumentation handles integer HTTP statuses.

    2.74.0release notes

  • The cached Anthropic _iterator property is preserved.

    2.74.0release notes

  • WSGI instrumentation no longer overwrites server.address.

    2.74.0release notes

  • Cron jobs with unsupported schedules are no longer monitored.

    2.73.0release notes

  • Beat schedule intervals are no longer rounded down.

    2.73.0release notes

  • litellm==1.107.0 is excluded from extras.

    2.73.0release notes

  • Special float values in attributes are now handled correctly.

    2.73.0release notes

  • Fixes span, metrics, and log client reports.

    2.72.0release notes

  • Improves localhost detection for IPv6 addresses.

    2.72.0release notes

  • Finishes the span for StreamingBody correctly.

    2.72.0release notes

  • Events are kept when a processor raises an exception.

    2.71.0release notes

  • User callbacks are isolated and client reports are emitted.

    2.71.0release notes

  • User info is now attached to streaming spans in the aws-lambda integration.

    2.69.2release notes

  • Avoids an infinite serialization loop in the bottle integration.

    2.69.2release notes

  • Fixes the type of disabled_integrations.

    2.69.2release notes

  • functions_to_trace now works when spans are streamed.

    2.69.2release notes

  • The integration now tolerates None candidates.

    2.69.2release notes

  • Pydantic AI no longer captures tool execution spans when validation fails.

    2.69.2release notes

  • The aiohttp integration preserves SigV4-signed propagation headers.

    2.69.1release notes

  • A failed flush no longer kills the flusher thread.

    2.69.0release notes

  • Fixes botocore SigV4 failures caused by post-sign trace propagation.

    2.69.0release notes

  • The OpenAI Responses API integration now reads input_text parts.

    2.69.0release notes

  • Tool and prompt handlers now handle None arguments.

    2.69.0release notes

  • Quart skips quart-flask-patch and adjusts error handling for quart>=0.23.

    2.69.0release notes

  • The OpenAI integration checks that Response.output is a list before iterating.

    2.69.0release notes

  • Stateless StreamableHTTP servers are no longer reported as stdio.

    2.69.0release notes

  • Starlette sets the transaction name on the current scope in the sync handler.

    2.69.0release notes

  • When enable_logs=True, standard-library logging and Loguru integrations auto-collect and send logs to Sentry by default, preserving old behavior.

    2.68.1release notes

  • Anthropic, Google GenAI, LangChain, LangGraph, Hugging Face Hub, OpenAI, and OpenAI Agents gate this attribute on outputs rather than inputs.

    2.68.1release notes

  • LangChain uses this attribute when data collection is enabled.

    2.68.1release notes

  • The scope now receives the segment source when using NoOpStreamedSpan.

    2.68.0release notes

  • The scope now receives the segment name when using NoOpStreamedSpan.

    2.68.0release notes

  • The early return for NoOpStreamedSpan was removed, allowing set_transaction_name() to proceed for that span type.

    2.68.0release notes

  • Adds a global flush trigger based on the span number.

    2.67.1release notesrelease notes

  • Exceptions raised in before_breadcrumb no longer bubble up.

    2.67.0release notes

  • Usage is no longer double-counted in multi-candidate responses.

    2.67.0release notes

  • The integration patches the correct run_single_turn_streamed reference.

    2.67.0release notes

  • The integration stops destructively wrapping tools.

    2.67.0release notes

  • The integration no longer records duplicate spans.

    2.67.0release notes

  • The AWS Lambda layer now supports Python 3.14.

    2.67.0release notes

  • The streaming set_conversation_id API now works.

    2.67.0release notes

  • The segment source is set when it is unset.

    2.67.0release notes

  • Exceptions raised within traces_sampler and other callbacks are now handled.

    2.66.1release notes

  • Streaming paths skip child span creation when there is no current span across HTTP clients, task queues, databases, web frameworks, Django, and miscellaneous integrations.

    2.66.0release notes

  • Starlette AuthenticationMiddleware no longer overwrites a user set during the request.

    2.65.0release notes

  • Django async middleware process_* hooks no longer raise ValueError.

    2.65.0release notes

  • ASGI request span attributes now include url.path.

    2.64.0release notes

  • Cursor iteration and fetch now use distinct span ops to prevent N+1 false positives.

    2.64.0release notes

  • GraphBubbleUp exceptions are now ignored.

    2.64.0release notes

  • The span is stored off-band rather than in forwarded metadata.

    2.64.0release notes

  • Streaming traces no longer truncate data in the trace lifecycle.

    2.64.0release notes

  • Streamed query spans now include db.query.text.

    2.64.0release notes

  • URLs no longer duplicate scope["root_path"].

    2.64.0release notes

  • Prevents sync handlers from being double-wrapped on FastAPI >= 0.137.

    2.63.0release notes

  • Uses the effective route context path for prefixed routers.

    2.63.0release notes

  • Control flow exceptions are no longer captured.

    2.62.0release notes

  • Handles baggage values containing '=' when parsing an incoming header.

    2.62.0release notes

  • Handles the string shorthand form of image_url when checking for image types with blob content.

    2.62.0release notes

  • Hooks are only used when ModelRequestContext.model exists.

    2.62.0release notes

  • Restores functools.wraps() for patched functions.

    2.62.0release notes

  • A failing child span no longer sets the transaction status.

    2.61.0release notes

  • The Anthropic integration no longer sets gen_ai.response.model to None.

    2.61.0release notes

  • The integration guards against a None response ID or response model.

    2.61.0release notes

  • Fixes an AttributeError on graphql_span in resolve.

    2.61.0release notes

  • Group and chord handling in enqueue is fixed.

    2.61.0release notes

  • A failing child span no longer sets the transaction status.

    2.61.0release notes

  • A TypeError during langchain.agents import is now caught.

    2.61.0release notes

  • A failing child span no longer sets the transaction status.

    2.61.0release notes

  • A failing child span no longer sets the transaction status.

    2.61.0release notes

  • A memory leak in SentrySpanProcessor is fixed.

    2.61.0release notes

  • OpenAI Agents uses name rather than description when calling start_span.

    2.61.0release notes

  • OpenAI Agents runner patches now handle the starting_agent keyword argument.

    2.61.0release notes

  • Yields are wrapped in try-except to ensure span cleanup.

    2.61.0release notes

  • http.server spans are now segments.

    2.60.0release notes

  • The OpenAI integration guards against choices being None.

    2.60.0release notes

  • A failing child span no longer sets the transaction status.

    2.60.0release notes

  • Responses patches finish only relevant spans.

    2.60.0release notes

  • Chat Completions patches finish only relevant spans.

    2.60.0release notes

  • Adds overloads for the trace decorator to fix typing.

    2.60.0release notes

  • Using proto version 2 fixes backfilled user agent and IP.

    2.60.0release notes

  • The batcher resets its lock and flusher in a child process after fork.

    2.59.0release notes

  • Adding request source now exits early consistently.

    2.59.0release notes

  • For openai-agents 0.14 and later, the integration resolves the agent from bindings.

    2.59.0release notes

  • The profiler no longer nulls its buffer on teardown.

    2.59.0release notes

  • The ASGI integration uses inspect.iscoroutinefunction on Python 3.14 and later.

    2.59.0release notes

  • The Quart integration uses inspect.iscoroutinefunction when Quart does.

    2.59.0release notes

  • Metrics and logs no longer attach span_id when there is no active span.

    2.59.0release notes

  • The Starlette and FastAPI integrations use inspect.iscoroutinefunction when Starlette does.

    2.59.0release notes

  • The context manager no longer double yields.

    2.59.0release notes

  • Anthropic .create() patches now finish only relevant spans.

    2.58.0release notes

  • WSGI request.url construction now respects HTTP_X_FORWARDED_PROTO.

    2.58.0release notes

  • Exceptions raised during Anthropic stream() calls are now captured.

    2.58.0release notes

  • LiteLLM streaming no longer exits spans twice.

    2.58.0release notes

  • A failing child span no longer sets the transaction status for Anthropic or Hugging Face Hub spans.

    2.58.0release notes

  • Cycle detection was added to exceptions_from_error.

    2.57.0release notes

  • Only types with _iterator are wrapped for streamed responses.

    2.57.0release notes

  • Patching AsyncMessageStream.close() ensures the associated span is finished.

    2.56.0release notes

  • Patching AsyncStream.close() ensures the associated span is finished.

    2.56.0release notes

  • Starlette integration now catches ImportError for Jinja2Templates.

    2.56.0release notes

  • Patching MessageStream.close() ensures the associated span is finished.

    2.56.0release notes

  • Patching Stream.close() ensures the associated span is finished.

    2.56.0release notes

  • Anthropic streaming spans now receive exception info when applicable.

    2.56.0release notes

  • LangChain wraps finish_reason in an array for the gen_ai span attribute.

    2.55.0release notes

  • Anthropic spans are now closed on GeneratorExit.

    2.55.0release notes

  • A deadlock in the log batcher is fixed.

    2.55.0release notes

  • Prevents a buffer race condition during rapid profiler start/stop cycles.

    2.55.0release notes

  • safe_serialize no longer double-serializes strings.

    2.55.0release notes

  • Celery now propagates headers set by the user.

    2.55.0release notes

  • Fixes token accounting.

    2.54.0release notes

  • Reads the method from handler_call_details for grpcio >= 1.76 compatibility.

    2.54.0release notes

  • Correctly appends baggage in the async client.

    2.54.0release notes

  • Avoids consuming iterables passed to the Completions API.

    2.54.0release notes

  • Avoids consuming iterables passed to the Embeddings API.

    2.54.0release notes

  • Adapts to ToolManager._call_tool being missing.

    2.54.0release notes

  • Does not wrap file responses when uWSGI offload-threads is enabled.

    2.54.0release notes

  • Patched the OpenAI Agents integration function following a library refactor.

    2.53.0release notes

  • Patched the OpenAI Agents integration function following a library refactor.

    2.53.0release notes

  • Patched the OpenAI Agents integration function following a library refactor.

    2.53.0release notes

  • Patched the OpenAI Agents integration function following a library refactor.

    2.53.0release notes

  • Fixes token reporting for Anthropic.

    2.52.0release notes

  • Fixes token reporting for Google Genai.

    2.52.0release notes

  • Deactivates Google Genai when LangChain is used.

    2.52.0release notes

  • Propagation headers are injected for HostedMCPTool when streaming.

    2.52.0release notes

  • Fixes the type of list attributes.

    2.52.0release notes

  • MCP integrations handle all awaitable return types.

    2.52.0release notes

  • MCP spans are nested under HTTP transactions.

    2.52.0release notes

  • Fixes token reporting for OpenAI.

    2.52.0release notes

  • The arq integration handles settings_cls when it is passed as a keyword argument.

    2.52.0release notes

  • Dramatiq cleans up the isolated scope and transaction when a message is skipped.

    2.52.0release notes

  • AI handling now keeps a single content input message.

    2.51.0release notes

  • Stops suppressing exception chains in AI integrations.

    2.50.0release notes

  • Adds content transformation for images and documents.

    2.50.0release notes

  • Reports image inputs and reworks extraction of gen_ai.request.messages from parameters.

    2.50.0release notes

  • Reverts the signature change to the patched gql.Client.execute method.

    2.50.0release notes

  • Derives interception state from channel fields.

    2.50.0release notes

  • Handles proxy tunnels in the httplib integration.

    2.50.0release notes

  • Adds multimodal content transformation functions for images, audio, and files.

    2.50.0release notes

  • Fixes gen_ai.request.messages to match the expected structure.

    2.50.0release notes

  • Guards integrations against module shadowing in litellm, clickhouse, pure-eval, ray, and typer.

    2.50.0release notes

  • Formats binary input message parts to conform with the gen_ai.request.messages structure.

    2.50.0release notes

  • Sends client reports for span recorder overflow.

    2.50.0release notes

  • Handles channels shadowing in the threading integration.

    2.50.0release notes

  • Fixes count_tokens for OpenAI.

    2.49.0release notes

  • Gates third-party imports in the grpc integration.

    2.49.0release notes

  • Gates third-party imports in the OpenTelemetry integration.

    2.49.0release notes

  • Keeps variadic keyword arguments last in signatures in the Ray integration.

    2.49.0release notes

  • Gates third-party imports in the Tryton integration.

    2.49.0release notes

  • Django sets the active thread ID when middleware spans are disabled.

    2.48.0release notes

  • The Ray actor class decorator now works with arguments.

    2.48.0release notes

  • The openai-agents integration fixes multi-patching of get_model.

    2.48.0release notes

  • The openai-agents integration fixes input messages that were wrapped too much in some cases.

    2.48.0release notes

  • pydantic-ai and openai-agents are added to the deactivation list to prohibit double span creation.

    2.48.0release notes

  • Logs set span_id instead of the sentry.trace.parent_span_id attribute.

    2.48.0release notes

  • Tornado no longer logs internal exceptions for user authentication.

    2.48.0release notes

  • The integration now stores the invoke_agent span on agents.RunContextWrapper.

    2.47.0release notes

  • The Anthropic integration now sets GEN_AI_OPERATION_NAME.

    2.47.0release notes

  • The integration no longer exits early when config is omitted, allowing it to set gen_ai.request.messages.

    2.47.0release notes

  • The system prompt is now included in the gen_ai.request.messages attribute.

    2.47.0release notes

  • The LangChain integration now adds gen_ai.response.model to chat spans.

    2.47.0release notes

  • _normalize_data now handles Pydantic model classes.

    2.47.0release notes

  • The OpenAI Agents integration avoids exiting a span twice when an exception occurs.

    2.47.0release notes

  • This method now always returns a PropagationContext.

    2.47.0release notes

  • Span status is added back.

    2.47.0release notes

  • Spotlight behavior is aligned with the SDK spec.

    2.47.0release notes

  • Input handling for embeddings in the LiteLLM integration is enhanced.

    2.46.0release notes

  • Fixes the integration mistakenly enabling itself.

    2.46.0release notes

  • Embeddings support for OpenAI is improved.

    2.46.0release notes

  • Imports are defensive to avoid ModuleNotFoundError in the Pydantic AI integration.

    2.46.0release notes

  • Exceptions are now expected when re-raised.

    2.46.0release notes

  • Metadata is preserved on wrapped coroutines.

    2.46.0release notes

  • Casts message and detail attributes before appending exception notes.

    2.45.0release notes

  • Ensures GEN_AI_AGENT_NAME is properly set for GEN_AI spans under an invoke_agent span.

    2.45.0release notes

  • Updates sentry.origin for logs.

    2.45.0release notes

  • Properly handles exceptions in tool calls.

    2.44.0release notes

  • Properly distinguishes network.transport from mcp.transport.

    2.44.0release notes

  • Fixes the NOT_GIVEN check in the Anthropic integration.

    2.44.0release notes

  • Adds input messages to errored spans as well.

    2.44.0release notes

  • Checks that response text is present to avoid AttributeError.

    2.44.0release notes

  • Avoids failing when ToolManager._call_tool() receives new parameters.

    2.44.0release notes

  • Improves how Django cache hits and misses are classified.

    2.43.0release notes

  • Uses the error tracing function to determine whether an execute tool span should be marked as an error.

    2.43.0release notes

  • Truncates messages for Google GenAI.

    2.43.0release notes

  • Sets the agent name for the Google GenAI integration.

    2.43.0release notes

  • Adds message truncation for LiteLLM.

    2.43.0release notes

  • Makes logger template formatting safer when keyword arguments are missing.

    2.43.0release notes

  • Messages are truncated for Anthropic, helping keep captured messages within size limits.

    2.42.1release notes

  • Scopes are injected into TimeoutThread exceptions with AWS Lambda, so exception handling has the correct scope context.

    2.42.1release notes

  • Events without breadcrumbs now receive a default breadcrumbs value.

    2.42.1release notes

  • Scopes are injected into TimeoutThread exceptions when using GCP, so exception handling has the correct scope context.

    2.42.1release notes

  • Messages are truncated for LangChain, helping keep captured messages within size limits.

    2.42.1release notes

  • Messages are truncated for LangGraph, helping keep captured messages within size limits.

    2.42.1release notes

  • Embeddings are classified correctly in the LiteLLM integration.

    2.42.1release notes

  • Message truncation is introduced for OpenAI integrations, helping keep captured messages within size limits.

    2.42.1release notes

  • ValueError is handled during scope resets.

    2.42.1release notes

  • Patching Ray tasks now retains the original function name.

    2.42.0release notes

  • The implementation moved to sentry_sdk.tracing_utils, while the top-level API remains accessible.

    2.0.0release notes

sentry-sdk 18 changes

Breaking changes 1

  • Explicitly setting the experimental option was removed; its value is now detected automatically.

    1.0.0release notes

Behavior and default changes 2

Fixes and other changes 5

  • Fixed the worker dropping events with level error when logging data dropping.

    1.0.0release notes

  • Tracing gets HTTP headers from the span rather than the transaction when possible.

    1.0.0release notes

  • Fixed Flask transactions missing the request body when they do not error.

    1.0.0release notes

  • Django transaction names now use request.path_info rather than request.path.

    1.0.0release notes

  • Fixed honoring the X-Forwarded-For header.

    1.0.0release notes