@@ -99,7 +99,7 @@ def get_parent_sample_rand(parent_context, trace_id):
9999def dropped_result (parent_span_context , attributes , sample_rate = None , sample_rand = None ):
100100 # type: (SpanContext, Attributes, Optional[float], Optional[Decimal]) -> SamplingResult
101101 # these will only be added the first time in a root span sampling decision
102- # if sample_rate is provided, it 'll be updated in trace state
102+ # if sample_rate or sample_rand is provided, they 'll be updated in trace state
103103 trace_state = parent_span_context .trace_state
104104
105105 if TRACESTATE_SAMPLED_KEY not in trace_state :
@@ -140,7 +140,7 @@ def dropped_result(parent_span_context, attributes, sample_rate=None, sample_ran
140140def sampled_result (span_context , attributes , sample_rate = None , sample_rand = None ):
141141 # type: (SpanContext, Attributes, Optional[float], Optional[Decimal]) -> SamplingResult
142142 # these will only be added the first time in a root span sampling decision
143- # if sample_rate is provided, it 'll be updated in trace state
143+ # if sample_rate or sample_rand is provided, they 'll be updated in trace state
144144 trace_state = span_context .trace_state
145145
146146 if TRACESTATE_SAMPLED_KEY not in trace_state :
0 commit comments