-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Adds semantic conventions for exceptions #1492
Adds semantic conventions for exceptions #1492
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1492 +/- ##
=====================================
Coverage 78.5% 78.5%
=====================================
Files 133 133
Lines 7083 7083
=====================================
Hits 5567 5567
Misses 1270 1270
Partials 246 246
|
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.
I would like to separate the change to semantic conventions from the decision whether to use RecordError
, RecordException
, or both.
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.
Blocking this until a resolution can be decided on in #1491
I'm not able to push to this branch. @mothershipper can you resolve the conflicts so we can merge this? |
Adds support for the opentelemetry exceptions semantic conventions. In short, this has RecordError produce an exception event with exception attributes instead of using the error event and error attributes. While golang does not have exceptions, the spec itself does not differentiate between errors and exceptions for recording purposes. RecordError was kept as the method name, both for backwards compatibility and to reduce confusion (the method signature takes in a golang error object). The spec appears to allow this, as it suggests the method is optional and signature may reflect whatever is most appropriate for the language implementing it. It may seem non-intuitive to log an exception event from a method called RecordError, but it's beneficial to have consistent behavior across all opentelemetry SDKs. Downstream projects like the opentelemetry-collector can build off of the published API and not special case behaviors from individual languages.
👍 rebased and pushed |
Alters RecordError to support the opentelemetry semantic conventions for exceptions. In
short, this renames the
error
event toexception
and updates the attribute keys.*Fixes #1491