How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.22.0
Steps to Reproduce
Set traces and profile rates to strings:
traces_sample_rate="1",
profiles_sample_rate="1",
Expected Result
For Django to bootstrap and run and/or for traces and profiles sample rates to either both accept strings or both fail, either way they should be consistent it seems.
Actual Result
To adjust profile and sample rates on the fly we add them to a centralized store as strings. However,
this surfaced an inconsistency, setting profiles_sample_rate as a string causes Django to not bootstrap.
Output
File "/Users/jree/.pyenv/versions/3.11.4/envs/shepherd-3.11/lib/python3.11/site-packages/sentry_sdk/profiler/transaction_profiler.py", line 127, in has_profiling_enabled
if profiles_sample_rate is not None and profiles_sample_rate > 0:
^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'str' and 'int'
This only affects profiles_sample_rate, traces_sample_rate is not affected by this.
How do you use Sentry?
Sentry Saas (sentry.io)
Version
2.22.0
Steps to Reproduce
Set traces and profile rates to strings:
Expected Result
For Django to bootstrap and run and/or for traces and profiles sample rates to either both accept strings or both fail, either way they should be consistent it seems.
Actual Result
To adjust profile and sample rates on the fly we add them to a centralized store as strings. However,
this surfaced an inconsistency, setting profiles_sample_rate as a string causes Django to not bootstrap.
Output
This only affects
profiles_sample_rate,traces_sample_rateis not affected by this.