fix: _set_status should not override existing span status (#3713)#4410
fix: _set_status should not override existing span status (#3713)#4410RiyaChaturvedi37 wants to merge 15 commits intoopen-telemetry:mainfrom
Conversation
3ae80cc to
d712f06
Compare
239f47f to
7214d29
Compare
MikeGoldsmith
left a comment
There was a problem hiding this comment.
Looks good - thanks @RiyaChaturvedi37. I've left a suggestion for moving the dict out of the func and updating a test decription.
76ae517 to
c07192b
Compare
MikeGoldsmith
left a comment
There was a problem hiding this comment.
Thanks for the updates. There's still some more things to fix up before we can accept.
|
Hi @MikeGoldsmith, I've addressed all the feedback — moved the dict to module level, simplified the _set_span_status function, fixed the test description, and resolved the CHANGELOG conflict. Please let me know if there's anything else needed. Thank you! |
…n/_semconv.py Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com>
|
Hi @MikeGoldsmith, |
Description
Fixes #3713
Problem
_set_statuswas unconditionally callingspan.set_status(Status(status))without checking if a status was already set. This caused two bugs:
Fix
Added a priority check before calling
span.set_status:Tests
Added 4 new tests in
test_semconv_status.py: