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
12 changes: 12 additions & 0 deletions skywalking/trace/segment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ def __init__(self, carrier: 'Carrier'):
self.endpoint = carrier.endpoint # type: str
self.client_address = carrier.client_address # type: str

def __eq__(self, other):
if not isinstance(other, SegmentRef):
raise NotImplementedError
return self.ref_type == other.ref_type and \
self.trace_id == other.trace_id and \
self.segment_id == other.segment_id and \
self.span_id == other.span_id and \
self.service == other.service and \
self.service_instance == other.service_instance and \
self.endpoint == other.endpoint and \
self.client_address == other.client_address


class _NewID(ID):
pass
Expand Down