sentry-python icon indicating copy to clipboard operation
sentry-python copied to clipboard

Add `activate()` and `deactivate()` span API

Open sentrivana opened this issue 2 months ago • 1 comments

Right now, starting and finishing a span without the context manager is clunky, having to call __enter__() and __exit__(). We should consider porting activate() and deactivate() from potel-base.

Note: naming TBD, as well as if we actually want this feature. Also consider how this interacts with the new span first API.

Reference PR from potel-base: https://github.com/getsentry/sentry-python/pull/4447

sentrivana avatar Oct 15 '25 13:10 sentrivana

PY-1890

linear[bot] avatar Oct 15 '25 13:10 linear[bot]