Skip to content

Commit

Permalink
Fix: Span.tag() for overridable
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-pytel committed Nov 20, 2020
1 parent 586c3b6 commit 8eabef3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions skywalking/trace/span.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,12 @@ def tag(self, tag: Tag) -> 'Span':
self.tags.append(deepcopy(tag))
return self

for t in self.tags:
for i, t in enumerate(self.tags):
if t.key == tag.key:
t.val = tag.val
self.tags[i] = deepcopy(tag)
break
else:
self.tags.append(deepcopy(tag))

return self

Expand Down

0 comments on commit 8eabef3

Please sign in to comment.