Update Span.record_exception to to adhere to specs#1314
Update Span.record_exception to to adhere to specs#1314codeboten merged 7 commits intoopen-telemetry:masterfrom
Conversation
|
Can you add a link to the specs changes in question that fixes? Since there was no issue created for this, a small description of the changes would be great. |
Co-authored-by: Leighton Chen <lechen@microsoft.com>
|
Hi @lzchen, Thanks for the suggestion. I have updated the description. |
| self, | ||
| exception: Exception, | ||
| attributes: types.Attributes = None, | ||
| timestamp: Optional[int] = None, |
There was a problem hiding this comment.
Is timestamp defined in the specs?
There was a problem hiding this comment.
From specs
To facilitate recording an exception languages SHOULD provide a RecordException method if the language uses exceptions. This is a specialized variant of AddEvent, so for anything not specified here, the same requirements as for AddEvent apply
An API to record a single Event where the Event properties are passed as arguments. This MAY be called AddEvent. This API takes the name of the event, optional Attributes and an optional Timestamp which can be used to specify the time at which the event occurred
|
@lonewolf3739 @codeboten Looks like we have an issue and PR open for this already. However if we can get this one approved we can just merge this one. |
Co-authored-by: Leighton Chen <lechen@microsoft.com>
Co-authored-by: Leighton Chen <lechen@microsoft.com>
codeboten
left a comment
There was a problem hiding this comment.
Thanks for implementing this change!
Description
Spec says,
To facilitate recording an exception languages SHOULD provide a
RecordExceptionmethod if the language uses exceptions. This is a specialized variant ofAddEvent, so for anything not specified here, the same requirements as forAddEventapply.AddEventaccepts optional event attributes and timestamp. This PR makesSpan.record_exceptionto to adhere to specsHow Has This Been Tested?
toxChecklist: