Skip to content
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

Log errors #921

Closed
dmathieu opened this issue Apr 13, 2024 · 7 comments
Closed

Log errors #921

dmathieu opened this issue Apr 13, 2024 · 7 comments
Assignees
Labels
area:error enhancement New feature or request experts needed This issue or pull request is outside an area where general approvers feel they can approve triage:needs-triage

Comments

@dmathieu
Copy link
Member

Area(s)

area:error

Is your change request related to a problem? Please describe.

Logs have semantic conventions for exceptions, but not all errors are exceptions (some languages such as Go don't even have the notion of exception).

Describe the solution you'd like

Introduce the error namespace for logs, and add the field error.message to that namespace.

Describe alternatives you've considered

We could also not introduce a new namespace, and document that non-exception errors should be treated as exceptions.

Additional context

@dmathieu dmathieu added enhancement New feature or request experts needed This issue or pull request is outside an area where general approvers feel they can approve triage:needs-triage labels Apr 13, 2024
@pyohannes
Copy link
Contributor

There's been some related discussions in open-telemetry/opentelemetry-specification#3198.

I think it was the discussion in this issue that resulted in the introduction of the error namespace.

Also, in this issue there were some interesting discussions about the fact that the term "error" corresponds to the span status in tracing, but to the severity in logging. For spans, it seemed feasible to use the status description for capturing error messages, however, it wasn't clear how this should translate to other signals.

@joaopgrassi
Copy link
Member

I wonder if discussions about this should be kept in the spec issue or here. Seems it goes beyond semantic conventions and affects other areas as well.

@dmathieu
Copy link
Member Author

With exception being stabilized, I suppose a rename of exception into error is not possible.
The specification above did mention having both exceptions and errors though.

I'm also happy opening a spec issue if that'd be a better place.

@pellared
Copy link
Member

I would say that for Go we need error to differ between regular error handling and panics where we could use exception.

@pellared
Copy link
Member

@dmathieu
Copy link
Member Author

Yes, that's the alternative suggested in the issue description. I'm fine going with that alternative.

@dmathieu
Copy link
Member Author

dmathieu commented Aug 1, 2024

Closing per the last 2 comments.

@dmathieu dmathieu closed this as completed Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:error enhancement New feature or request experts needed This issue or pull request is outside an area where general approvers feel they can approve triage:needs-triage
Projects
None yet
Development

No branches or pull requests

5 participants