-
Notifications
You must be signed in to change notification settings - Fork 626
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
Align optional parameters for span related to exceptions, add exception.escaped for record_exception #1365
Conversation
if span._record_exception: | ||
span.record_exception(exc) |
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.
Would it work if on line 854 if you did
with span:
yield span
to avoid repeating this code?
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.
This would work. The only reason why I left it in two different places is because record_exception
wouldn't know if escaped
is True or not.
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.
Just a nit.
start_as_current_span()
andstart_span()
should have identical constructors. For the parameters related to exception and status:record_exception()
if exception raisedERROR
if exception raisedAs well, from this comment,
adding
exception.escaped
attribute when exception raised from span being used as a context manager.