-
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
Add span status and error recording subsections to trace docs #2893
Add span status and error recording subsections to trace docs #2893
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2893 +/- ##
=====================================
Coverage 75.7% 75.7%
=====================================
Files 177 177
Lines 11819 11819
=====================================
+ Hits 8950 8954 +4
+ Misses 2636 2632 -4
Partials 233 233
|
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
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
What are "rare cases"? |
|
||
result, err := operationThatCouldFail() | ||
if err != nil { | ||
span.SetStatus(codes.Error, "operationThatCouldFail failed") |
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.
https://opentelemetry.io/docs/instrumentation/go/getting-started/
- setting the status before recording an error - This differs from the "Getting Started" documentation.
- Similarly, why use
"operationThatCouldFail failed"
for the description as opposed toerr.Error()
. Is there a best practice?
Please open a new issue or discussion to address any new questions you have instead of commenting here. |
opened #2943 |
For some reason I thought the docs had these, but someone brought it up in a support forum and they couldn't find where to record an error. This should bring the manual tracing docs more up to par with other languages that document this.