File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1258,15 +1258,16 @@ def start_streamed_span(
12581258 attributes ,
12591259 self ,
12601260 )
1261+
1262+ if sample_rate is not None :
1263+ self ._update_sample_rate (sample_rate )
1264+
12611265 if sampled is False :
12621266 return NoOpStreamedSpan (
12631267 scope = self ,
12641268 unsampled_reason = outcome ,
12651269 )
12661270
1267- if sample_rate is not None :
1268- self ._update_sample_rate (sample_rate )
1269-
12701271 return StreamedSpan (
12711272 name = name ,
12721273 attributes = attributes ,
Original file line number Diff line number Diff line change @@ -522,11 +522,7 @@ def _iter_headers(self) -> "Iterator[tuple[str, str]]":
522522
523523 def _update_active_thread (self ) -> None :
524524 thread_id , thread_name = get_current_thread_meta ()
525- self ._set_thread (thread_id , thread_name )
526525
527- def _set_thread (
528- self , thread_id : "Optional[int]" , thread_name : "Optional[str]"
529- ) -> None :
530526 if thread_id is not None :
531527 self .set_attribute (SPANDATA .THREAD_ID , str (thread_id ))
532528
You can’t perform that action at this time.
0 commit comments