Skip to content

Commit 78bc646

Browse files
committed
.
1 parent 91a3042 commit 78bc646

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

sentry_sdk/traces.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
)
2323
from sentry_sdk.tracing_utils import (
2424
Baggage,
25-
has_tracing_enabled,
2625
)
2726
from sentry_sdk.utils import (
2827
capture_internal_exceptions,
@@ -35,7 +34,7 @@
3534

3635
if TYPE_CHECKING:
3736
from typing import Any, Callable, Iterator, Optional, ParamSpec, TypeVar, Union
38-
from sentry_sdk._types import Attributes, AttributeValue, SamplingContext
37+
from sentry_sdk._types import Attributes, AttributeValue
3938
from sentry_sdk.profiler.continuous_profiler import ContinuousProfile
4039

4140
P = ParamSpec("P")
@@ -237,10 +236,10 @@ class StreamedSpan:
237236
"_status",
238237
"_scope",
239238
"_previous_span_on_scope",
240-
"_continuous_profile",
241239
"_baggage",
242240
"_sample_rand",
243241
"_sample_rate",
242+
"_continuous_profile",
244243
)
245244

246245
def __init__(
@@ -530,10 +529,6 @@ def _update_active_thread(self) -> None:
530529
if thread_name is not None:
531530
self.set_attribute(SPANDATA.THREAD_NAME, thread_name)
532531

533-
def _set_profile_id(self, profiler_id: "Optional[str]") -> None:
534-
if profiler_id is not None:
535-
self.set_attribute("sentry.profiler_id", profiler_id)
536-
537532
def _get_trace_context(self) -> "dict[str, Any]":
538533
# Even if spans themselves are not event-based anymore, we need this
539534
# to populate trace context on events
@@ -551,6 +546,10 @@ def _get_trace_context(self) -> "dict[str, Any]":
551546

552547
return context
553548

549+
def _set_profile_id(self, profiler_id: "Optional[str]") -> None:
550+
if profiler_id is not None:
551+
self.set_attribute("sentry.profiler_id", profiler_id)
552+
554553
def _start_profile(self) -> None:
555554
if not self._is_segment():
556555
return

0 commit comments

Comments
 (0)