We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e65d05b + e62f0c5 commit 1ea7768Copy full SHA for 1ea7768
aws_xray_sdk/core/context.py
@@ -78,11 +78,13 @@ def end_subsegment(self, end_time=None):
78
:param float end_time: epoch in seconds. If not specified the current
79
system time will be used.
80
"""
81
- subsegment = self.get_trace_entity()
82
- if self._is_subsegment(subsegment):
83
- subsegment.close(end_time)
+ entity = self.get_trace_entity()
+ if self._is_subsegment(entity):
+ entity.close(end_time)
84
self._local.entities.pop()
85
return True
86
+ elif isinstance(entity, DummySegment):
87
+ return False
88
else:
89
log.warning("No subsegment to end.")
90
return False
0 commit comments