Skip to content

Commit 6a85f5e

Browse files
committed
ref: Add active to StreamedSpan
1 parent 47ed910 commit 6a85f5e

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
@@ -71,6 +71,7 @@ class StreamedSpan:
7171
__slots__ = (
7272
"_name",
7373
"_attributes",
74+
"_active",
7475
"_span_id",
7576
"_trace_id",
7677
"_status",
@@ -81,9 +82,11 @@ def __init__(
8182
*,
8283
name: str,
8384
attributes: "Optional[Attributes]" = None,
85+
active: bool = True,
8486
trace_id: "Optional[str]" = None,
8587
):
8688
self._name: str = name
89+
self._active: bool = active
8790
self._attributes: "Attributes" = {}
8891
if attributes:
8992
for attribute, value in attributes.items():
@@ -100,7 +103,8 @@ def __repr__(self) -> str:
100103
f"<{self.__class__.__name__}("
101104
f"name={self._name}, "
102105
f"trace_id={self.trace_id}, "
103-
f"span_id={self.span_id}>"
106+
f"span_id={self.span_id}, "
107+
f"active={self._active})>"
104108
)
105109

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

0 commit comments

Comments
 (0)