File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1224,6 +1224,8 @@ def start_streamed_span(
12241224 parent_span_id = propagation_context .parent_span_id ,
12251225 parent_sampled = propagation_context .parent_sampled ,
12261226 baggage = propagation_context .baggage ,
1227+ sample_rand = sample_rand ,
1228+ sample_rate = sample_rate ,
12271229 )
12281230
12291231 # This is a child span; take propagation context from the parent span
Original file line number Diff line number Diff line change @@ -224,6 +224,8 @@ class StreamedSpan:
224224 "_scope" ,
225225 "_previous_span_on_scope" ,
226226 "_baggage" ,
227+ "_sample_rand" ,
228+ "_sample_rate" ,
227229 )
228230
229231 def __init__ (
@@ -238,6 +240,8 @@ def __init__(
238240 parent_span_id : "Optional[str]" = None ,
239241 parent_sampled : "Optional[bool]" = None ,
240242 baggage : "Optional[Baggage]" = None ,
243+ sample_rate : "Optional[float]" = None ,
244+ sample_rand : "Optional[float]" = None ,
241245 ):
242246 self ._name : str = name
243247 self ._active : bool = active
@@ -254,6 +258,8 @@ def __init__(
254258 self ._parent_span_id = parent_span_id
255259 self ._parent_sampled = parent_sampled
256260 self ._baggage = baggage
261+ self ._sample_rand = sample_rand
262+ self ._sample_rate = sample_rate
257263
258264 self ._start_timestamp = datetime .now (timezone .utc )
259265 self ._timestamp : "Optional[datetime]" = None
You can’t perform that action at this time.
0 commit comments