-
Notifications
You must be signed in to change notification settings - Fork 625
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix span.status #577
Fix span.status #577
Conversation
I signed it |
Hi @gky360, welcome! Your solution looks good by I think we could do it slightly different, what do you think about adding opentelemetry-python/opentelemetry-sdk/src/opentelemetry/sdk/trace/__init__.py Lines 607 to 610 in c8b336d
It would also be nice to include a test to avoid this error happening again, I think you can do something like:
The goal is to be sure that the raised exception passes without being modified (not new exceptions are raised).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Thank you for the review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for the contribution and for adding the test!
Fixes the error caused by
span.status
inuse_span
.As
status
is not included inopentelemetry.trace.Span
,span.status
inuse_span
may cause an error.For example, when
use_span
is called withDefaultSpan
, it causes the error below.