Upgrading sentry-sdk 0.15 to 0.16
Breaking0.15.1 → 0.16.5Breaking2New6Changed3Fixed4Other1
BreakingUpgrade verdict
2 breaking changes.
In plain terms
- The tracing API has been reworked, so code using the old tracing API must be updated.
- The before_send hook no longer runs on transactions, so any filtering done there for transactions stops applying.
Must act 2 items need code or config changes
What you must change
Breaking2
Revamps the tracing API.
before_send is no longer called for transactions.before_sendAPI changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
1 default value changed. Same names, same signatures: imports and type checks still pass, but calls that leave this argument out now get the new value.
- added:
function start_transaction(transaction=…, **kwargs)
- default 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=…, sample_rate=…, send_default_pii=…, http_proxy=…, https_proxy=…, ignore_errors=…, request_bodies=…, before_send=…, before_breadcrumb=…, debug=…, attach_stacktrace=…, ca_ce…traceparent_v2was Falsenow True
- added:
method Hub.start_transaction(transaction=…, **kwargs)
- added:
constructor AwsLambdaIntegration(timeout_warning=…) - added:
variable MILLIS_TO_SECONDS - added:
variable TIMEOUT_WARNING_BUFFER
- added:
export patch_resolver
- added:
function patch_resolver()
- added:
class ExecutingIntegration(Integration) - added:
field ExecutingIntegration.identifier - added:
static method ExecutingIntegration.setup_once()
- added:
class PureEvalIntegration(Integration) - added:
field PureEvalIntegration.identifier - added:
function pure_eval_frame(frame) - added:
static method PureEvalIntegration.setup_once()
- removed:
method Scope.transaction(value) - added:
property Scope.transaction
- changed:
function serialize(event, **kwargs) → function serialize(event, smart_transaction_trimming=…, **kwargs) - added:
variable MAX_EVENT_BYTES - added:
variable Span
- removed:
method Span.init_finished_spans(maxlen) - changed:
constructor Span(trace_id=…, span_id=…, parent_span_id=…, same_process_as_parent=…, sampled=…, transaction=…, op=…, description=…, hub=…, status=…) → constructor Span(trace_id=…, span_id=…, parent_span_id=…, same_process_as_parent=…, sampled=…, op=…, description=…, hub=…, status=…, transaction=…) - changed:
static method Span.continue_from_environ(environ) → static method Span.continue_from_environ(environ, **kwargs) - changed:
static method Span.continue_from_headers(headers) → static method Span.continue_from_headers(headers, **kwargs) - changed:
static method Span.from_traceparent(traceparent) → static method Span.from_traceparent(traceparent, **kwargs) - added:
class Transaction(Span) - added:
constructor Transaction(name=…, **kwargs) - added:
method Span.init_span_recorder(maxlen) - added:
method Span.start_child(**kwargs) - added:
method Transaction.finish(hub=…)
- removed:
function stacktrace_from_traceback(tb=…, with_locals=…) - added:
class ServerlessTimeoutWarning(Exception) - added:
class TimeoutThread(threading.Thread) - added:
constructor TimeoutThread(waiting_time, configured_timeout) - added:
function json_dumps(data) - added:
method Auth.get_api_url(type=…) - added:
method TimeoutThread.run()