Open
Description
We are close to releasing the next major update to the Sentry Python SDK 3.0.0
. We want to dog food this in sentry
.
Because this is a big change we want to roll them out incrementally.
Preparation in sentry-python
:
- Release a separate new package
sentry-sdk-alpha
to PyPI and local PyPI (not part of this PR)
Code changes in sentry
:
- Add a feature flag in
sentry
called something likeuse-alpha-version-of-python-sdk
. - Fix all call sites of importing the SDK. Something like:
if use_alpha_version_of_python_sdk:
import sentry_sdk_alpha as sentry_sdk
else:
import sentry_sdk
- Fix all call sites of
start_transaction()
because it is gone in 3.0.0:
if use_alpha_version_of_python_sdk:
start_transaction_func = sentry_sdk.start_transaction
else:
start_transaction_func = sentry_sdk.start_span
with start_transaction_func(...):
...
- Update traces_sampler so it can handle old style parameters and new style parameters. Or make two separate traces_samplers one for each version. See the migration guide to learn what has changed.
custom_sampling_context
does not exist anymore. See the migration guide to learn how to update this.- Check everything else in the migration guide
- ... probably more ...
Rollout
- first release it just to a very small number of our servers and monitor
- then gradually increase the number of servers this is deployed to.