Skip to content

Commit 6445447

Browse files
committed
ref: Add active to StreamedSpan
1 parent 5023c76 commit 6445447

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

sentry_sdk/traces.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ class StreamedSpan:
7070
__slots__ = (
7171
"_name",
7272
"_attributes",
73+
"_active",
7374
"_span_id",
7475
"_trace_id",
7576
"_status",
@@ -80,9 +81,11 @@ def __init__(
8081
*,
8182
name: str,
8283
attributes: "Optional[Attributes]" = None,
84+
active: bool = True,
8385
trace_id: "Optional[str]" = None,
8486
):
8587
self._name: str = name
88+
self._active: bool = active
8689
self._attributes: "Attributes" = {}
8790
if attributes:
8891
for attribute, value in attributes.items():
@@ -99,7 +102,8 @@ def __repr__(self) -> str:
99102
f"<{self.__class__.__name__}("
100103
f"name={self._name}, "
101104
f"trace_id={self.trace_id}, "
102-
f"span_id={self.span_id})>"
105+
f"span_id={self.span_id}, "
106+
f"active={self._active})>"
103107
)
104108

105109
def get_attributes(self) -> "Attributes":

0 commit comments

Comments
 (0)