You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/12/04 23:40:43 UTC

[GitHub] [skywalking-python] tom-pytel commented on a change in pull request #93: [Fix][Plugin] sw_flask general exceptions handled

tom-pytel commented on a change in pull request #93:
URL: https://github.com/apache/skywalking-python/pull/93#discussion_r536446817



##########
File path: skywalking/trace/context.py
##########
@@ -150,22 +151,24 @@ def ignore_check(self, op: str, kind: Kind):
         return None
 
     def start(self, span: Span):
+        self.nspans += 1
         spans = _spans()
         if span not in spans:
             spans.append(span)
 
     def stop(self, span: Span) -> bool:
+        self.nspans -= 1

Review comment:
       Not really necessary because at this point `finish()` always actually finishes since I changed the depth check in `StackedSpan` from `finish()` to `stop()` where it more naturally belongs, so doesn't really matter where it goes and the `if span.finish(self.segment)` will always succeed. In fact I should maybe get rid of it?

##########
File path: skywalking/trace/context.py
##########
@@ -74,6 +74,7 @@ def __init__(self):
         self.segment = Segment()  # type: Segment
         self._sid = Counter()
         self._correlation = {}  # type: dict
+        self.nspans = 0

Review comment:
       Ok




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org