Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions sentry_sdk/traces.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
from sentry_sdk._types import Attributes, AttributeValue


FLAGS_CAPACITY = 10


class SpanStatus(str, Enum):
OK = "ok"
ERROR = "error"
Expand Down Expand Up @@ -65,10 +62,10 @@ class StreamedSpan:
"""
A span holds timing information of a block of code.

Spans can have multiple child spans thus forming a span tree.
Spans can have multiple child spans, thus forming a span tree.

This is the Span First span implementation. The original transaction-based
span implementation lives in tracing.Span.
This is the Span First span implementation that streams spans. The original
transaction-based span implementation lives in tracing.Span.
"""

__slots__ = (
Expand All @@ -77,7 +74,6 @@ class StreamedSpan:
"_span_id",
"_trace_id",
"_status",
"_flags",
)

def __init__(
Expand All @@ -99,8 +95,6 @@ def __init__(
self.set_status(SpanStatus.OK)
self.set_source(SegmentSource.CUSTOM)

self._flags: dict[str, bool] = {}

def get_attributes(self) -> "Attributes":
return self._attributes

Expand Down Expand Up @@ -143,10 +137,6 @@ def get_name(self) -> str:
def set_name(self, name: str) -> None:
self._name = name

def set_flag(self, flag: str, result: bool) -> None:
if len(self._flags) < FLAGS_CAPACITY:
self._flags[flag] = result

def set_op(self, op: str) -> None:
self.set_attribute("sentry.op", op)

Expand Down
Loading