Skip to content

Commit a58982c

Browse files
committed
refactor(sdk_span): Adapt SDK spans to use the kind parameter
Signed-off-by: Varsha GS <varsha.gs@ibm.com>
1 parent 905a32d commit a58982c

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

src/instana/span/sdk_span.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,10 @@ def get_span_kind(self, span) -> Tuple[str, int]:
5151
:param span: The span to search for the `span.kind` attribute
5252
:return: Tuple (String, Int)
5353
"""
54-
kind = ("intermediate", 3)
55-
if "span.kind" in span.attributes:
56-
if span.attributes["span.kind"] in ENTRY_KIND:
57-
kind = ("entry", 1)
58-
elif span.attributes["span.kind"] in EXIT_KIND:
59-
kind = ("exit", 2)
54+
if span.kind in ENTRY_KIND:
55+
kind = ("entry", 1)
56+
elif span.kind in EXIT_KIND:
57+
kind = ("exit", 2)
58+
else:
59+
kind = ("intermediate", 3)
6060
return kind
61-
62-

0 commit comments

Comments
 (0)