File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1043,15 +1043,18 @@ def start_transaction(
10431043 sampling_context .update (custom_sampling_context )
10441044 transaction ._set_initial_sampling_decision (sampling_context = sampling_context )
10451045
1046- # update the sample rate in the dsc. the baggage should be immutable
1047- # at this point, but in order to not have broken traces we make
1048- # an exception here
1046+ # update the sample rate in the dsc
10491047 propagation_context = self .get_active_propagation_context ()
10501048 if propagation_context and transaction .sample_rate is not None :
10511049 dsc = propagation_context .dynamic_sampling_context
10521050 if dsc is not None :
10531051 dsc ["sample_rate" ] = str (transaction .sample_rate )
10541052
1053+ if transaction ._baggage :
1054+ dsc = transaction ._baggage .sentry_items ["sample_rate" ] = str (
1055+ transaction .sample_rate
1056+ )
1057+
10551058 if transaction .sampled :
10561059 profile = Profile (
10571060 transaction .sampled , transaction ._start_timestamp_monotonic_ns
You can’t perform that action at this time.
0 commit comments