Skip to content

Commit d824113

Browse files
committed
guard against none
1 parent 1778130 commit d824113

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sentry_sdk/scope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ def start_transaction(
10471047
# at this point, but in order to not have broken traces we make
10481048
# an exception here
10491049
propagation_context = self.get_active_propagation_context()
1050-
if propagation_context:
1050+
if propagation_context and transaction.sample_rate is not None:
10511051
dsc = propagation_context.dynamic_sampling_context
10521052
if dsc is not None:
10531053
dsc["sample_rate"] = str(transaction.sample_rate)

0 commit comments

Comments
 (0)