Skip to content

Upgrading sentry-sdk 0.20 to 1

Breaking0.20.3 → 1.45.1Breaking8Security3Platform5Deprecated3New118Changed108Fixed198Other161

BreakingUpgrade verdict

8 breaking changes and 5 platform requirement changes and 3 security fixes.

  • Session tracking is now on by default, and the old experimental settings for it are gone.
  • If you wrote a custom metric filter function, it now receives more information and must accept four inputs.
  • Two experimental metric summary settings are gone, so any config using them must be removed.
  • Removes OpenTelemetryIntegration from __init__.py.
Top 5 of 19 that need code or config changes
Breaking8
Moves the experimental auto_session_tracking flag to a proper option and removes explicit session_mode, auto-detecting it and enabling release health by default.
auto_session_trackingsession_mode
Changes before_emit_metric to accept four arguments (key, value, unit, tags) instead of two.
before_emit_metric_experiments
Removes the experimental metrics_summary_sample_rate and should_summarize_metric options.
metrics_summary_sample_rateshould_summarize_metric_experiments
Removes OpenTelemetryIntegration from __init__.py.
OpenTelemetryIntegration
Renames the request_bodies option to max_request_body_size.
request_bodiesmax_request_body_size
Removes the deprecated tracestate.
tracestate
Unifies span operation names, which can break Sentry Dashboards and Discover queries that use transaction.op.
transaction.op
Moves the internal function _get_installed_modules from sentry_sdk.integrations.modules to sentry_sdk.utils.
_get_installed_modulessentry_sdk.integrations.modulessentry_sdk.utils
Security3
Stops sending the full environment to subprocesses, backporting a fix for GHSA-g92j-qhmh-64v2.
Low · CVSS 2.5
Sentry SDK leaks sensitive session information when sendDefaultPII is set to True
High · CVSS 7.6
Treats the x-api-key header as sensitive so it is not sent to Sentry.
x-api-key
Platform5
Removes Python 3.7 and adds Python 3.12 for Lambda support.
Removes Python 2.7 support for AWS Lambda layers in craft config.
Adds support for Python 3.12.
Officially supports Python 3.11.
Adds AWS Lambda Python 3.9 runtime support.
Deprecated3
Deprecates last_event_id().
last_event_id()
Deprecates with_locals in favor of include_local_variables.
with_localsinclude_local_variables
Adds a deprecation warning for Python 3.4 and 3.5.

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • added: export trace
  • changed: function capture_event(event, hint=…, scope=…, **scope_args) → function capture_event(event, hint=…, scope=…, **scope_kwargs)
  • changed: function capture_exception(error=…, scope=…, **scope_args) → function capture_exception(error=…, scope=…, **scope_kwargs)
  • changed: function capture_message(message, level=…, scope=…, **scope_args) → function capture_message(message, level=…, scope=…, **scope_kwargs)
  • added: function continue_trace(environ_or_headers, op=…, name=…, source=…)
  • added: function get_baggage()
  • added: function get_current_span(hub=…)
  • added: function get_traceparent()
  • added: function set_measurement(name, value, unit=…)
  • added: variable SDK_INFO
  • added: variable module_not_found_error
  • removed: variable SDK_INFO
  • changed: constructor ClientConstructor(dsn=…, with_locals=…, max_breadcrumbs=…, release=…, environment=…, server_name=…, shutdown_timeout=…, integrations=…, in_app_include=…, in_app_exclude=…, default_integrations=…, dist=…, transport=…, transport_queue_size=…, sample_rate=…, send_default_pii=…, http_proxy=…, https_proxy=…, ignore_errors=…, request_bodies=…, before_send=…, before_breadcrumb=…, debug=…, at… → constructor ClientConstructor(dsn=…, max_breadcrumbs=…, release=…, environment=…, server_name=…, shutdown_timeout=…, integrations=…, in_app_include=…, in_app_exclude=…, default_integrations=…, dist=…, transport=…, transport_queue_size=…, sample_rate=…, send_default_pii=…, http_proxy=…, https_proxy=…, ignore_errors=…, max_request_body_size=…, socket_options=…, keep_alive=…, before_send=…, before_b…
  • added: class INSTRUMENTER
  • added: class OP
  • added: class SPANDATA
  • added: field INSTRUMENTER.OTEL
  • added: field INSTRUMENTER.SENTRY
  • added: field OP.CACHE_GET_ITEM
  • added: field OP.DB
  • added: field OP.DB_REDIS
  • added: field OP.EVENT_DJANGO
  • added: field OP.FUNCTION
  • added: field OP.FUNCTION_AWS
  • added: field OP.FUNCTION_GCP
  • added: field OP.GRAPHQL_EXECUTE
  • added: field OP.GRAPHQL_MUTATION
  • added: field OP.GRAPHQL_PARSE
  • added: field OP.GRAPHQL_QUERY
  • added: field OP.GRAPHQL_RESOLVE
  • added: field OP.GRAPHQL_SUBSCRIPTION
  • added: field OP.GRAPHQL_VALIDATE
  • added: field OP.GRPC_CLIENT
  • added: field OP.GRPC_SERVER
  • added: field OP.HTTP_CLIENT
  • added: field OP.HTTP_CLIENT_STREAM
  • added: field OP.HTTP_SERVER
  • added: field OP.MIDDLEWARE_DJANGO
  • added: field OP.MIDDLEWARE_STARLETTE
  • added: field OP.MIDDLEWARE_STARLETTE_RECEIVE
  • added: field OP.MIDDLEWARE_STARLETTE_SEND
  • added: field OP.MIDDLEWARE_STARLITE
  • added: field OP.MIDDLEWARE_STARLITE_RECEIVE
  • added: field OP.MIDDLEWARE_STARLITE_SEND
  • added: field OP.OPENAI_CHAT_COMPLETIONS_CREATE
  • added: field OP.OPENAI_EMBEDDINGS_CREATE
  • added: field OP.QUEUE_SUBMIT_ARQ
  • added: field OP.QUEUE_SUBMIT_CELERY
  • added: field OP.QUEUE_SUBMIT_HUEY
  • added: field OP.QUEUE_TASK_ARQ
  • added: field OP.QUEUE_TASK_CELERY
  • added: field OP.QUEUE_TASK_HUEY
  • added: field OP.QUEUE_TASK_RQ
  • added: field OP.SOCKET_CONNECTION
  • added: field OP.SOCKET_DNS
  • added: field OP.SUBPROCESS
  • added: field OP.SUBPROCESS_COMMUNICATE
  • added: field OP.SUBPROCESS_WAIT
  • added: field OP.TEMPLATE_RENDER
  • added: field OP.VIEW_RENDER
  • added: field OP.VIEW_RESPONSE_RENDER
  • added: field OP.WEBSOCKET_SERVER
  • added: field SPANDATA.CACHE_HIT
  • added: field SPANDATA.CACHE_ITEM_SIZE
  • added: field SPANDATA.CODE_FILEPATH
  • added: field SPANDATA.CODE_FUNCTION
  • added: field SPANDATA.CODE_LINENO
  • added: field SPANDATA.CODE_NAMESPACE
  • added: field SPANDATA.DB_NAME
  • added: field SPANDATA.DB_OPERATION
  • added: field SPANDATA.DB_SYSTEM
  • added: field SPANDATA.DB_USER
  • added: field SPANDATA.HTTP_FRAGMENT
  • added: field SPANDATA.HTTP_METHOD
  • added: field SPANDATA.HTTP_QUERY
  • added: field SPANDATA.HTTP_STATUS_CODE
  • added: field SPANDATA.SERVER_ADDRESS
  • added: field SPANDATA.SERVER_PORT
  • added: field SPANDATA.SERVER_SOCKET_ADDRESS
  • added: field SPANDATA.SERVER_SOCKET_PORT
  • added: field SPANDATA.THREAD_ID
  • added: field SPANDATA.THREAD_NAME
  • added: variable DEFAULT_MAX_VALUE_LENGTH
  • added: variable FALSE_VALUES
  • added: variable MATCH_ALL
  • added: export MonitorStatus
  • added: export capture_checkin
  • added: export monitor
  • added: function capture_checkin(monitor_slug=…, check_in_id=…, status=…, duration=…, monitor_config=…)
  • added: class MonitorStatus
  • added: field MonitorStatus.ERROR
  • added: field MonitorStatus.IN_PROGRESS
  • added: field MonitorStatus.OK
  • added: class monitor(MonitorMixin)
  • added: constructor monitor(monitor_slug=…, monitor_config=…)
  • added: export TYPE_CHECKING
  • added: export datetime_utcnow
  • added: function cache_statement(statement, options)
  • added: function remove_expired_cache_items()
  • added: function should_run_explain_plan(statement, options)
  • added: variable EXPLAIN_CACHE
  • added: variable EXPLAIN_CACHE_SIZE
  • added: variable EXPLAIN_CACHE_TIMEOUT_SECONDS
  • added: function attach_explain_plan_to_span(span, connection, statement, parameters, mogrify, options)
  • added: function attach_explain_plan_to_span(span, connection, statement, parameters, options)
  • added: function parse_json(data)
  • added: method Envelope.add_checkin(checkin)
  • added: method Envelope.add_profile(profile)
  • changed: class init(ClientConstructor, ContextManager[Any]) → class init(ClientConstructor, _InitGuard)
  • changed: method Hub.capture_event(event, hint=…, scope=…, **scope_args) → method Hub.capture_event(event, hint=…, scope=…, **scope_kwargs)
  • changed: method Hub.capture_exception(error=…, scope=…, **scope_args) → method Hub.capture_exception(error=…, scope=…, **scope_kwargs)
  • changed: method Hub.capture_message(message, level=…, scope=…, **scope_args) → method Hub.capture_message(message, level=…, scope=…, **scope_kwargs)
  • changed: method Hub.iter_trace_propagation_headers() → method Hub.iter_trace_propagation_headers(span=…)
  • changed: method Hub.start_session() → method Hub.start_session(session_mode=…)
  • changed: method Hub.start_span(span=…, **kwargs) → method Hub.start_span(span=…, instrumenter=…, **kwargs)
  • changed: method Hub.start_transaction(transaction=…, **kwargs) → method Hub.start_transaction(transaction=…, instrumenter=…, **kwargs)
  • added: method Hub.continue_trace(environ_or_headers, op=…, name=…, source=…)
  • added: method Hub.get_baggage()
  • added: method Hub.get_traceparent()
  • added: method Hub.trace_propagation_meta(span=…)
  • removed: export MYPY
  • added: export TYPE_CHECKING
  • added: function create_trace_config()
  • added: class AriadneIntegration(Integration)
  • added: field AriadneIntegration.identifier
  • added: static method AriadneIntegration.setup_once()
  • added: variable ariadne_graphql
  • added: class ArqIntegration(Integration)
  • added: field ArqIntegration.identifier
  • added: function patch_create_worker()
  • added: function patch_enqueue_job()
  • added: function patch_run_job()
  • added: static method ArqIntegration.setup_once()
  • added: variable ARQ_CONTROL_FLOW_EXCEPTIONS
  • changed: constructor SentryAsgiMiddleware(app, unsafe_context_data=…) → constructor SentryAsgiMiddleware(app, unsafe_context_data=…, transaction_style=…, mechanism_type=…)
  • added: variable TRANSACTION_STYLE_VALUES
  • added: class AsyncioIntegration(Integration)
  • added: field AsyncioIntegration.identifier
  • added: function get_name(coro)
  • added: function patch_asyncio()
  • added: static method AsyncioIntegration.setup_once()
  • added: class AsyncPGIntegration(Integration)
  • added: constructor AsyncPGIntegration(*, record_params: bool=…)
  • added: field AsyncPGIntegration.identifier
  • added: static method AsyncPGIntegration.setup_once() -> None
  • added: variable SubCursor
  • added: variable T
  • added: variable asyncpg_version
  • changed: constructor CeleryIntegration(propagate_traces=…) → constructor CeleryIntegration(propagate_traces=…, monitor_beat_tasks=…, exclude_beat_tasks=…)
  • added: class NoOpMgr
  • added: function crons_task_failure(sender, **kwargs)
  • added: function crons_task_retry(sender, **kwargs)
  • added: function crons_task_success(sender, **kwargs)
  • added: variable RedBeatScheduler
  • added: variable cast
  • added: class ClickhouseDriverIntegration(Integration)
  • added: class ParamSpec
  • added: constructor ParamSpec(_)
  • added: field ClickhouseDriverIntegration.identifier
  • added: static method ClickhouseDriverIntegration.setup_once() -> None
  • added: variable Callable
  • added: variable P
  • added: variable T
  • added: class CLOUD_PLATFORM
  • added: class CLOUD_PROVIDER
  • added: class CloudResourceContextIntegration(Integration)
  • added: constructor CloudResourceContextIntegration(cloud_provider=…)
  • added: field CLOUD_PLATFORM.AWS_EC2
  • added: field CLOUD_PLATFORM.GCP_COMPUTE_ENGINE
  • added: field CLOUD_PROVIDER.ALIBABA
  • added: field CLOUD_PROVIDER.AWS
  • added: field CLOUD_PROVIDER.AZURE
  • added: field CLOUD_PROVIDER.GCP
  • added: field CLOUD_PROVIDER.IBM
  • added: field CLOUD_PROVIDER.TENCENT
  • added: field CloudResourceContextIntegration.aws_token
  • added: field CloudResourceContextIntegration.cloud_provider
  • added: field CloudResourceContextIntegration.gcp_metadata
  • added: field CloudResourceContextIntegration.http
  • added: field CloudResourceContextIntegration.identifier
  • added: static method CloudResourceContextIntegration.setup_once()
  • added: variable AWS_METADATA_HOST
  • added: variable AWS_METADATA_URL
  • added: variable AWS_TOKEN_URL
  • added: variable CONTEXT_TYPE
  • added: variable GCP_METADATA_HOST
  • added: variable GCP_METADATA_URL
  • added: variable context_getters
  • removed: export MYPY
  • changed: constructor DjangoIntegration(transaction_style=…, middleware_spans=…) → constructor DjangoIntegration(transaction_style=…, middleware_spans=…, signals_spans=…, cache_spans=…, signals_denylist=…)
  • added: export AnnotatedValue
  • added: export OP
  • added: export SENSITIVE_DATA_SUBSTITUTE
  • added: export SOURCE_FOR_STYLE
  • added: export SPANDATA
  • added: export Scope
  • added: export Span
  • added: export TRANSACTION_SOURCE_URL
  • added: export TYPE_CHECKING
  • added: export add_query_source
  • added: export attach_explain_plan_to_span
  • added: export patch_caching
  • added: export patch_signals
  • added: export string_types
  • added: export text_type
  • added: field DjangoIntegration.cache_spans
  • added: field DjangoIntegration.signals_denylist
  • added: field DjangoIntegration.signals_spans
  • added: variable ASGIRequest
  • added: variable patch_caching
  • added: function patch_caching()
  • added: variable METHODS_TO_INSTRUMENT
  • added: function patch_signals()
  • added: variable RoutePattern
  • added: variable FALCON3
  • added: variable falcon_app_class
  • added: variable falcon_helpers
  • added: class FastApiIntegration(StarletteIntegration)
  • added: field FastApiIntegration.identifier
  • added: function patch_get_request_handler()
  • added: static method FastApiIntegration.setup_once()
  • added: class GQLIntegration(Integration)
  • added: field GQLIntegration.identifier
  • added: static method GQLIntegration.setup_once()
  • added: variable EventDataType
  • added: variable MIN_GQL_VERSION
  • added: class GrapheneIntegration(Integration)
  • added: field GrapheneIntegration.identifier
  • added: static method GrapheneIntegration.setup_once()
  • added: class GRPCIntegration(Integration)
  • added: class ParamSpec
  • added: constructor ParamSpec(_)
  • added: export AsyncServerInterceptor
  • added: export AsyncUnaryStreamClientIntercetor
  • added: export AsyncUnaryUnaryClientInterceptor
  • added: export ClientInterceptor
  • added: export Integration
  • added: export ServerInterceptor
  • added: export TYPE_CHECKING
  • added: field GRPCIntegration.identifier
  • added: static method GRPCIntegration.setup_once() -> None
  • added: variable Callable
  • added: variable P
  • added: export ClientInterceptor
  • added: export ServerInterceptor
  • added: async method SentryUnaryStreamClientInterceptor.intercept_unary_stream(continuation: Callable[[ClientCallDetails, Message], UnaryStreamCall], client_call_details: ClientCallDetails, request: Message) -> Union[AsyncIterable[Any], UnaryStreamCall]
  • added: async method SentryUnaryUnaryClientInterceptor.intercept_unary_unary(continuation: Callable[[ClientCallDetails, Message], UnaryUnaryCall], client_call_details: ClientCallDetails, request: Message) -> Union[UnaryUnaryCall, Message]
  • added: class ClientInterceptor
  • added: class SentryUnaryStreamClientInterceptor(ClientInterceptor, UnaryStreamClientInterceptor)
  • added: class SentryUnaryUnaryClientInterceptor(ClientInterceptor, UnaryUnaryClientInterceptor)
  • added: async method ServerInterceptor.intercept_service(continuation, handler_call_details)
  • added: class ServerInterceptor(grpc.aio.ServerInterceptor)
  • added: constructor ServerInterceptor(find_name=…)
  • added: class ClientInterceptor(grpc.UnaryUnaryClientInterceptor, grpc.UnaryStreamClientInterceptor)
  • added: method ClientInterceptor.intercept_unary_stream(continuation, client_call_details, request)
  • added: method ClientInterceptor.intercept_unary_unary(continuation, client_call_details, request)
  • added: class ServerInterceptor(grpc.ServerInterceptor)
  • added: constructor ServerInterceptor(find_name=…)
  • added: method ServerInterceptor.intercept_service(continuation, handler_call_details)
  • added: class HttpxIntegration(Integration)
  • added: field HttpxIntegration.identifier
  • added: static method HttpxIntegration.setup_once()
  • added: class HueyIntegration(Integration)
  • added: field HueyIntegration.identifier
  • added: function patch_enqueue()
  • added: function patch_execute()
  • added: static method HueyIntegration.setup_once()
  • added: variable F
  • added: variable HUEY_CONTROL_FLOW_EXCEPTIONS
  • removed: variable COMMON_RECORD_ATTRS
  • changed: class BreadcrumbHandler(logging.Handler, object) → class BreadcrumbHandler(_BaseHandler)
  • changed: class EventHandler(logging.Handler, object) → class EventHandler(_BaseHandler)
  • added: variable LOGGING_TO_EVENT_LEVEL
  • added: class LoggingLevels(enum.IntEnum)
  • added: class LoguruBreadcrumbHandler(_LoguruBaseHandler, BreadcrumbHandler)
  • added: class LoguruEventHandler(_LoguruBaseHandler, EventHandler)
  • added: class LoguruIntegration(Integration)
  • added: constructor LoguruIntegration(level=…, event_level=…, breadcrumb_format=…, event_format=…)
  • added: field LoggingLevels.CRITICAL
  • added: field LoggingLevels.DEBUG
  • added: field LoggingLevels.ERROR
  • added: field LoggingLevels.INFO
  • added: field LoggingLevels.SUCCESS
  • added: field LoggingLevels.TRACE
  • added: field LoggingLevels.WARNING
  • added: field LoguruIntegration.identifier
  • added: static method LoguruIntegration.setup_once()
  • added: variable DEFAULT_EVENT_LEVEL
  • added: variable DEFAULT_LEVEL
  • added: class OpenAIIntegration(Integration)
  • added: constructor OpenAIIntegration(include_prompts=…)
  • added: field OpenAIIntegration.identifier
  • added: function count_tokens(s)
  • added: function set_data_normalized(span, key, value)
  • added: static method OpenAIIntegration.setup_once()
  • added: variable COMPLETION_TOKENS_USED
  • added: variable PROMPT_TOKENS_USED
  • added: variable TOTAL_TOKENS_USED
  • added: variable enc
  • added: export SentryPropagator
  • added: export SentrySpanProcessor
  • added: variable SENTRY_BAGGAGE_KEY
  • added: variable SENTRY_TRACE_KEY
  • added: class OpenTelemetryIntegration(Integration)
  • added: field OpenTelemetryIntegration.identifier
  • added: static method OpenTelemetryIntegration.setup_once()
  • added: variable CLASSES_TO_INSTRUMENT
  • added: class SentryPropagator(TextMapPropagator)
  • added: method SentryPropagator.extract(carrier, context=…, getter=…)
  • added: method SentryPropagator.inject(carrier, context=…, setter=…)
  • added: property SentryPropagator.fields
  • added: class SentrySpanProcessor(SpanProcessor)
  • added: constructor SentrySpanProcessor()
  • added: field SentrySpanProcessor.open_spans
  • added: field SentrySpanProcessor.otel_span_map
  • added: function link_trace_context_to_error_event(event, otel_span_map)
  • added: method SentrySpanProcessor.on_end(otel_span)
  • added: method SentrySpanProcessor.on_start(otel_span, parent_context=…)
  • added: variable OPEN_TELEMETRY_CONTEXT
  • added: variable SPAN_MAX_TIME_OPEN_MINUTES
  • added: class CommandTracer(monitoring.CommandListener)
  • added: class PyMongoIntegration(Integration)
  • added: constructor CommandTracer()
  • added: field PyMongoIntegration.identifier
  • added: method CommandTracer.failed(event)
  • added: method CommandTracer.started(event)
  • added: method CommandTracer.succeeded(event)
  • added: static method PyMongoIntegration.setup_once()
  • added: variable SAFE_COMMAND_ATTRIBUTES
  • added: class QuartIntegration(Integration)
  • added: constructor QuartIntegration(transaction_style=…)
  • added: field QuartIntegration.identifier
  • added: field QuartIntegration.transaction_style
  • added: function patch_asgi_app()
  • added: function patch_scaffold_route()
  • added: static method QuartIntegration.setup_once()
  • added: variable TRANSACTION_STYLE_VALUES
  • added: variable quart_auth
  • changed: function patch_redis_client(cls) → function patch_redis_client(cls, is_cluster, set_db_data_fn)
  • added: constructor RedisIntegration(max_data_size=…)
  • added: export DidNotEnable
  • added: export Hub
  • added: export Integration
  • added: export OP
  • added: export SENSITIVE_DATA_SUBSTITUTE
  • added: export SPANDATA
  • added: export Span
  • added: export TYPE_CHECKING
  • added: export capture_internal_exceptions
  • added: export logger
  • added: export text_type
  • added: function patch_redis_pipeline(pipeline_cls, is_cluster, get_command_args_fn, set_db_data_fn)
  • added: function patch_redis_async_client(cls, is_cluster, set_db_data_fn)
  • added: function patch_redis_async_pipeline(pipeline_cls, is_cluster, get_command_args_fn, set_db_data_fn)
  • added: constructor SanicIntegration(unsampled_statuses=…)
  • added: field SanicIntegration.version
  • added: variable old_error_handler_lookup
  • added: variable old_handle_request
  • added: variable old_router_get
  • added: variable old_startup
  • added: class SocketIntegration(Integration)
  • added: field SocketIntegration.identifier
  • added: static method SocketIntegration.setup_once()
  • added: async method StarletteRequestExtractor.content_length()
  • added: async method StarletteRequestExtractor.extract_request_info()
  • added: async method StarletteRequestExtractor.form()
  • added: async method StarletteRequestExtractor.json()
  • added: class StarletteIntegration(Integration)
  • added: class StarletteRequestExtractor
  • added: constructor StarletteIntegration(transaction_style=…)
  • added: constructor StarletteRequestExtractor(request)
  • added: field StarletteIntegration.identifier
  • added: field StarletteIntegration.transaction_style
  • added: field StarletteRequestExtractor.request
  • added: function patch_asgi_app()
  • added: function patch_authentication_middleware(middleware_class)
  • added: function patch_exception_middleware(middleware_class)
  • added: function patch_middlewares()
  • added: function patch_request_response()
  • added: function patch_templates()
  • added: method StarletteRequestExtractor.cookies()
  • added: method StarletteRequestExtractor.extract_cookies_from_request()
  • added: method StarletteRequestExtractor.is_json()
  • added: static method StarletteIntegration.setup_once()
  • added: variable TRANSACTION_STYLE_VALUES
  • added: variable multipart
  • added: class SentryStarliteASGIMiddleware(SentryAsgiMiddleware)
  • added: class StarliteIntegration(Integration)
  • added: constructor SentryStarliteASGIMiddleware(app: ASGIApp)
  • added: field StarliteIntegration.identifier
  • added: function enable_span_for_middleware(middleware: Middleware) -> Middleware
  • added: function exception_handler(exc: Exception, scope: Scope, _: State) -> None
  • added: function patch_app_init() -> None
  • added: function patch_http_route_handle() -> None
  • added: function patch_middlewares() -> None
  • added: function retrieve_user_from_scope(scope: Scope) -> Optional[Dict[str, Any]]
  • added: static method StarliteIntegration.setup_once() -> None
  • added: async method SentryAsyncExtension.resolve(_next, root, info, *args, **kwargs)
  • added: class SentryAsyncExtension(SchemaExtension)
  • added: class SentrySyncExtension(SentryAsyncExtension)
  • added: class StrawberryIntegration(Integration)
  • added: constructor SentryAsyncExtension(*, execution_context=…)
  • added: constructor StrawberryIntegration(async_execution=…)
  • added: field StrawberryIntegration.identifier
  • added: method SentryAsyncExtension.hash_query(query)
  • added: method SentryAsyncExtension.on_operation()
  • added: method SentryAsyncExtension.on_parse()
  • added: method SentryAsyncExtension.on_validate()
  • added: method SentryAsyncExtension.should_skip_tracing(_next, info)
  • added: method SentrySyncExtension.resolve(_next, root, info, *args, **kwargs)
  • added: static method StrawberryIntegration.setup_once()
  • removed: function get_host(environ)
  • changed: constructor SentryWsgiMiddleware(app) → constructor SentryWsgiMiddleware(app, use_x_forwarded_for=…)
  • changed: function get_request_url(environ) → function get_request_url(environ, use_x_forwarded_for=…)
  • added: class CounterMetric(Metric)
  • added: class DistributionMetric(Metric)
  • added: class GaugeMetric(Metric)
  • added: class LocalAggregator(object)
  • added: class Metric(object)
  • added: class MetricsAggregator(object)
  • added: class SetMetric(Metric)
  • added: constructor CounterMetric(first)
  • added: constructor DistributionMetric(first)
  • added: constructor GaugeMetric(first)
  • added: constructor LocalAggregator()
  • added: constructor MetricsAggregator(capture_func, enable_code_locations=…)
  • added: constructor SetMetric(first)
  • added: field MetricsAggregator.FLUSHER_SLEEP_TIME
  • added: field MetricsAggregator.MAX_WEIGHT
  • added: field MetricsAggregator.ROLLUP_IN_SECONDS
  • added: function distribution(key, value, unit=…, tags=…, timestamp=…, stacklevel=…)
  • added: function gauge(key, value, unit=…, tags=…, timestamp=…, stacklevel=…)
  • added: function get_code_location(stacklevel)
  • added: function increment(key, value=…, unit=…, tags=…, timestamp=…, stacklevel=…)
  • added: function metrics_noop(func)
  • added: function recursion_protection()
  • added: function set(key, value, unit=…, tags=…, timestamp=…, stacklevel=…)
  • added: function timing(key, value=…, unit=…, tags=…, timestamp=…, stacklevel=…)
  • added: method CounterMetric.add(value)
  • added: method CounterMetric.serialize_value()
  • added: method DistributionMetric.add(value)
  • added: method DistributionMetric.serialize_value()
  • added: method GaugeMetric.add(value)
  • added: method GaugeMetric.serialize_value()
  • added: method LocalAggregator.add(ty, key, value, unit, tags)
  • added: method LocalAggregator.to_json()
  • added: method Metric.add(value)
  • added: method Metric.serialize_value()
  • added: method MetricsAggregator.add(ty, key, value, unit, tags, timestamp=…, local_aggregator=…, stacklevel=…)
  • added: method MetricsAggregator.flush()
  • added: method MetricsAggregator.kill()
  • added: method MetricsAggregator.need_code_loation(ty, key, unit, timestamp)
  • added: method MetricsAggregator.record_code_location(ty, key, unit, stacklevel, timestamp=…)
  • added: method SetMetric.add(value)
  • added: method SetMetric.serialize_value()
  • added: property CounterMetric.weight
  • added: property DistributionMetric.weight
  • added: property GaugeMetric.weight
  • added: property Metric.weight
  • added: property SetMetric.weight
  • added: variable GOOD_TRANSACTION_SOURCES
  • added: variable METRIC_TYPES
  • added: variable TIMING_FUNCTIONS
  • added: variable incr
  • added: class Monitor(object)
  • added: constructor Monitor(transport, interval=…)
  • added: field Monitor.name
  • added: method Monitor.check_health()
  • added: method Monitor.is_healthy()
  • added: method Monitor.kill()
  • added: method Monitor.run()
  • added: method Monitor.set_downsample_factor()
  • added: property Monitor.downsample_factor
  • added: variable MAX_DOWNSAMPLE_FACTOR
  • added: class GeventScheduler(Scheduler)
  • added: class Profile(object)
  • added: class Scheduler(object)
  • added: class ThreadScheduler(Scheduler)
  • added: constructor GeventScheduler(frequency)
  • added: constructor Profile(transaction, hub=…, scheduler=…)
  • added: constructor Scheduler(frequency)
  • added: constructor ThreadScheduler(frequency)
  • added: field GeventScheduler.mode
  • added: field GeventScheduler.name
  • added: field Scheduler.mode
  • added: field ThreadScheduler.mode
  • added: field ThreadScheduler.name
  • added: function extract_frame(fid, raw_frame, cwd)
  • added: function extract_stack(raw_frame, cache, cwd, max_stack_depth=…)
  • added: function frame_id(raw_frame)
  • added: function get_frame_name(frame)
  • added: function has_profiling_enabled(options)
  • added: function setup_profiler(options)
  • added: function teardown_profiler()
  • added: method GeventScheduler.ensure_running()
  • added: method GeventScheduler.run()
  • added: method GeventScheduler.setup()
  • added: method GeventScheduler.teardown()
  • added: method Profile.process()
  • added: method Profile.start()
  • added: method Profile.stop()
  • added: method Profile.to_json(event_opt, options)
  • added: method Profile.update_active_thread_id()
  • added: method Profile.valid()
  • added: method Profile.write(ts, sample)
  • added: method Scheduler.ensure_running()
  • added: method Scheduler.make_sampler()
  • added: method Scheduler.setup()
  • added: method Scheduler.start_profiling(profile)
  • added: method Scheduler.stop_profiling(profile)
  • added: method Scheduler.teardown()
  • added: method ThreadScheduler.ensure_running()
  • added: method ThreadScheduler.run()
  • added: method ThreadScheduler.setup()
  • added: method ThreadScheduler.teardown()
  • added: variable DEFAULT_SAMPLING_FREQUENCY
  • added: variable ExtractedSample
  • added: variable ExtractedStack
  • added: variable FrameId
  • added: variable FrameIds
  • added: variable MAX_PROFILE_DURATION_NS
  • added: variable MAX_STACK_DEPTH
  • added: variable PROFILE_MINIMUM_SAMPLES
  • added: variable ProcessedFrame
  • added: variable ProcessedProfile
  • added: variable ProcessedSample
  • added: variable ProcessedStack
  • added: variable ProcessedThreadMetadata
  • added: variable ProfileContext
  • added: variable StackId
  • added: variable ThreadId
  • added: variable ThreadPool
  • added: variable thread_sleep
  • changed: method Scope.apply_to_event(event, hint) → method Scope.apply_to_event(event, hint, options=…)
  • added: method Scope.add_breadcrumb(crumb=…, hint=…, **kwargs)
  • added: method Scope.capture_event(event, hint=…, client=…, scope=…, **scope_kwargs)
  • added: method Scope.capture_exception(error=…, client=…, scope=…, **scope_kwargs)
  • added: method Scope.capture_message(message, level=…, client=…, scope=…, **scope_kwargs)
  • added: method Scope.continue_trace(environ_or_headers, op=…, name=…, source=…)
  • added: method Scope.end_session(*args, **kwargs)
  • added: method Scope.generate_propagation_context(incoming_data=…)
  • added: method Scope.get_baggage(*args, **kwargs)
  • added: method Scope.get_dynamic_sampling_context()
  • added: method Scope.get_trace_context()
  • added: method Scope.get_traceparent(*args, **kwargs)
  • added: method Scope.iter_headers()
  • added: method Scope.iter_trace_propagation_headers(*args, **kwargs)
  • added: method Scope.resume_auto_session_tracking()
  • added: method Scope.set_new_propagation_context()
  • added: method Scope.set_transaction_name(name, source=…)
  • added: method Scope.start_session(*args, **kwargs)
  • added: method Scope.start_span(span=…, instrumenter=…, **kwargs)
  • added: method Scope.start_transaction(transaction=…, instrumenter=…, **kwargs)
  • added: method Scope.stop_auto_session_tracking(*args, **kwargs)
  • added: method Scope.trace_propagation_meta(*args, **kwargs)
  • added: property Scope.profile
  • added: class EventScrubber(object)
  • added: constructor EventScrubber(denylist=…, recursive=…)
  • added: method EventScrubber.scrub_breadcrumbs(event)
  • added: method EventScrubber.scrub_dict(d)
  • added: method EventScrubber.scrub_event(event)
  • added: method EventScrubber.scrub_extra(event)
  • added: method EventScrubber.scrub_frames(event)
  • added: method EventScrubber.scrub_list(lst)
  • added: method EventScrubber.scrub_request(event)
  • added: method EventScrubber.scrub_spans(event)
  • added: method EventScrubber.scrub_user(event)
  • added: variable DEFAULT_DENYLIST
  • added: variable cast
  • changed: function serialize(event, smart_transaction_trimming=…, **kwargs) → function serialize(event, **kwargs)
  • changed: constructor Session(sid=…, did=…, timestamp=…, started=…, duration=…, status=…, release=…, environment=…, user_agent=…, ip_address=…, errors=…, user=…) → constructor Session(sid=…, did=…, timestamp=…, started=…, duration=…, status=…, release=…, environment=…, user_agent=…, ip_address=…, errors=…, user=…, session_mode=…)
  • changed: constructor SessionFlusher(capture_func, session_mode, flush_interval=…) → constructor SessionFlusher(capture_func, flush_interval=…)
  • changed: function auto_session_tracking(hub=…) → function auto_session_tracking(hub=…, session_mode=…)
  • added: class SpotlightClient(object)
  • added: constructor SpotlightClient(url)
  • added: function setup_spotlight(options)
  • added: method SpotlightClient.capture_envelope(envelope)
  • removed: class EnvironHeaders(Mapping)
  • removed: constructor EnvironHeaders(environ, prefix=…)
  • removed: function has_tracing_enabled(options)
  • removed: function record_sql_queries(hub, cursor, query, params_list, paramstyle, executemany)
  • changed: constructor Span(trace_id=…, span_id=…, parent_span_id=…, same_process_as_parent=…, sampled=…, op=…, description=…, hub=…, status=…, transaction=…) → constructor Span(trace_id=…, span_id=…, parent_span_id=…, same_process_as_parent=…, sampled=…, op=…, description=…, hub=…, status=…, transaction=…, containing_transaction=…, start_timestamp=…)
  • changed: constructor Transaction(name=…, parent_sampled=…, **kwargs) → constructor Transaction(name=…, parent_sampled=…, baggage=…, source=…, **kwargs)
  • changed: method Span.finish(hub=…) → method Span.finish(hub=…, end_timestamp=…)
  • changed: method Span.start_child(**kwargs) → method Span.start_child(instrumenter=…, **kwargs)
  • changed: method Transaction.finish(hub=…) → method Transaction.finish(hub=…, end_timestamp=…)
  • added: class NoOpSpan(Span)
  • added: function trace(func=…) | (func)
  • added: method NoOpSpan.finish(hub=…, end_timestamp=…)
  • added: method NoOpSpan.get_baggage()
  • added: method NoOpSpan.get_trace_context()
  • added: method NoOpSpan.init_span_recorder(maxlen)
  • added: method NoOpSpan.is_success()
  • added: method NoOpSpan.iter_headers()
  • added: method NoOpSpan.new_span(**kwargs)
  • added: method NoOpSpan.set_context(key, value)
  • added: method NoOpSpan.set_data(key, value)
  • added: method NoOpSpan.set_http_status(http_status)
  • added: method NoOpSpan.set_measurement(name, value, unit=…)
  • added: method NoOpSpan.set_status(value)
  • added: method NoOpSpan.set_tag(key, value)
  • added: method NoOpSpan.start_child(instrumenter=…, **kwargs)
  • added: method NoOpSpan.to_baggage()
  • added: method NoOpSpan.to_json()
  • added: method NoOpSpan.to_traceparent()
  • added: method Span.set_thread(thread_id, thread_name)
  • added: method Span.to_baggage()
  • added: method Transaction.get_baggage()
  • added: method Transaction.set_context(key, value)
  • added: method Transaction.set_http_status(http_status)
  • added: method Transaction.set_measurement(name, value, unit=…)
  • added: property NoOpSpan.containing_transaction
  • added: property Span.containing_transaction
  • added: property Transaction.containing_transaction
  • added: variable BAGGAGE_HEADER_NAME
  • added: variable LOW_QUALITY_TRANSACTION_SOURCES
  • added: variable P
  • added: variable R
  • added: variable SENTRY_TRACE_HEADER_NAME
  • added: variable SOURCE_FOR_STYLE
  • added: variable TRANSACTION_SOURCE_COMPONENT
  • added: variable TRANSACTION_SOURCE_CUSTOM
  • added: variable TRANSACTION_SOURCE_ROUTE
  • added: variable TRANSACTION_SOURCE_TASK
  • added: variable TRANSACTION_SOURCE_URL
  • added: variable TRANSACTION_SOURCE_VIEW
  • added: class Baggage(object)
  • added: class EnvironHeaders(Mapping)
  • added: constructor Baggage(sentry_items, third_party_items=…, mutable=…)
  • added: constructor EnvironHeaders(environ, prefix=…)
  • added: field Baggage.SENTRY_PREFIX
  • added: field Baggage.SENTRY_PREFIX_REGEX
  • added: function add_query_source(hub, span)
  • added: function extract_sentrytrace_data(header)
  • added: function has_tracing_enabled(options)
  • added: function maybe_create_breadcrumbs_from_span(hub, span)
  • added: function normalize_incoming_data(incoming_data)
  • added: function record_sql_queries(hub, cursor, query, params_list, paramstyle, executemany, record_cursor_repr=…)
  • added: function should_propagate_trace(hub, url)
  • added: method Baggage.dynamic_sampling_context()
  • added: method Baggage.freeze()
  • added: method Baggage.serialize(include_third_party=…)
  • added: static method Baggage.from_incoming_header(header)
  • added: static method Baggage.from_options(scope)
  • added: static method Baggage.populate_from_transaction(transaction)
  • added: variable SENTRY_TRACE_REGEX
  • added: variable base64_stripped
  • added: function start_child_span_decorator(func)
  • added: function start_child_span_decorator(func)
  • added: method HttpTransport.is_healthy()
  • added: method HttpTransport.on_dropped_event(reason)
  • added: method HttpTransport.record_lost_event(reason, data_category=…, item=…)
  • added: method Transport.is_healthy()
  • added: method Transport.record_lost_event(reason, data_category=…, item=…)
  • added: variable KEEP_ALIVE_SOCKET_OPTIONS
  • added: export Event
  • added: export Hint
  • added: variable Event
  • added: variable Hint
  • removed: function handle_in_app_impl(frames, in_app_exclude, in_app_include)
  • removed: variable MAX_FORMAT_PARAM_LENGTH
  • removed: variable MAX_STRING_LENGTH
  • changed: function current_stacktrace(with_locals=…) → function current_stacktrace(include_local_variables=…, include_source_context=…, max_value_length=…)
  • changed: function get_lines_from_file(filename, lineno, loader=…, module=…) → function get_lines_from_file(filename, lineno, max_length=…, loader=…, module=…)
  • changed: function get_source_context(frame, tb_lineno) → function get_source_context(frame, tb_lineno, max_value_length=…)
  • changed: function handle_in_app(event, in_app_exclude=…, in_app_include=…) → function handle_in_app(event, in_app_exclude=…, in_app_include=…, project_root=…)
  • changed: function serialize_frame(frame, tb_lineno=…, with_locals=…) → function serialize_frame(frame, tb_lineno=…, include_local_variables=…, include_source_context=…, max_value_length=…)
  • changed: function single_exception_from_error_tuple(exc_type, exc_value, tb, client_options=…, mechanism=…) → function single_exception_from_error_tuple(exc_type, exc_value, tb, client_options=…, mechanism=…, exception_id=…, parent_id=…, source=…)
  • changed: method Auth.to_header(timestamp=…) → method Auth.to_header()
  • added: function exceptions_from_error(exc_type, exc_value, tb, client_options=…, mechanism=…, exception_id=…, parent_id=…, source=…)
  • added: function from_base64(base64_string)
  • added: function get_current_thread_meta(thread=…)
  • added: function get_error_message(exc_value)
  • added: function get_gevent_hub()
  • added: function get_git_revision()
  • added: function get_sdk_name(installed_integrations)
  • added: function is_gevent()
  • added: function is_module_patched(*args, **kwargs)
  • added: function is_sentry_url(hub, url)
  • added: function is_valid_sample_rate(rate, source)
  • added: function match_regex_list(item, regex_list=…, substring_matching=…)
  • added: function nanosecond_time()
  • added: function now()
  • added: function package_version(package)
  • added: function parse_url(url, sanitize=…)
  • added: function parse_version(version)
  • added: function qualname_from_function(func)
  • added: function sanitize_url(url, remove_authority=…, remove_query_values=…, split=…)
  • added: function set_in_app_in_frames(frames, in_app_exclude, in_app_include, project_root=…)
  • added: function to_base64(original)
  • added: static method AnnotatedValue.removed_because_over_size_limit()
  • added: static method AnnotatedValue.removed_because_raw_data()
  • added: static method AnnotatedValue.substituted_because_contains_sensitive_data()
  • added: variable BASE64_ALPHABET
  • added: variable BaseExceptionGroup
  • added: variable Components
  • added: variable FileNotFoundError
  • added: variable ParsedUrl
  • added: variable SENSITIVE_DATA_SUBSTITUTE
  • added: variable copy_context
  • removed: method BackgroundWorker.on_full_queue(callback)
  • added: method BackgroundWorker.full()