-
Notifications
You must be signed in to change notification settings - Fork 239
Update recording errors doc - document when to use error
, exception
(or both) attributes
#2296
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
base: main
Are you sure you want to change the base?
Update recording errors doc - document when to use error
, exception
(or both) attributes
#2296
Conversation
docs/general/recording-errors.md
Outdated
|
||
- *Error* refers to a general concept describing any non-success condition. This may include an, non-success status code, or an invalid response. | ||
|
||
- *Exception* specifically refers to runtime exceptions and their associated stack traces. |
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.
How does this mesh with languages that don't have "exceptions" and actually only have "errors" like Go or Rust?
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 refactored it slightly, please take a look, the key change:
added
Errors and exceptions are related but not the same: an error can occur without
an exception being thrown, and an exception does not necessarily constitute an
error.Exceptions and how they are recorded in telemetry are inherently
language-specific. Some languages, such as Rust or Go, do not use exceptions
at all.This document focuses on recording errors.
Plus there are a couple of points below that should address it
Semantic conventions intended for cross-language applicability SHOULD use
error.*
attributes.
exception
attributes SHOULD be documented for conventions that target
exceptions directly such asexception
events.
2ec5940
to
1dc9015
Compare
Co-authored-by: Armin Ruech <[email protected]>
Fixes #2001
Updates errors guidance to cover:
error.message
attribute