Skip to content

Commit cb439fe

Browse files
committed
.
1 parent cc51564 commit cb439fe

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

sentry_sdk/scope.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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,

sentry_sdk/traces.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)