This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-python.git


The following commit(s) were added to refs/heads/master by this push:
     new f44acbe  Set default component of span to UNKNOWN instead of 0 (#242)
f44acbe is described below

commit f44acbe9078c83dca980eac3190184a19fe5a231
Author: ZEAL <[email protected]>
AuthorDate: Sun Oct 9 16:03:25 2022 +0800

    Set default component of span to UNKNOWN instead of 0 (#242)
    
    span.component should not be started as an Enum instead of a int 0. integer 
0 will be invalid if we just new_entry_span() without any further setting for 
span.component.
---
 skywalking/trace/span.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/skywalking/trace/span.py b/skywalking/trace/span.py
index 02fb118..96a0fba 100644
--- a/skywalking/trace/span.py
+++ b/skywalking/trace/span.py
@@ -174,7 +174,7 @@ class EntrySpan(Span):
     def start(self):
         Span.start(self)
         self._max_depth = self._depth
-        self.component = 0
+        self.component = Component.Unknown
         self.layer = Layer.Unknown
         self.logs = []
         self.tags = defaultdict(list)

Reply via email to