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

Add error logs as events to traces #83

Open
sissbruecker opened this issue Sep 1, 2022 · 0 comments
Open

Add error logs as events to traces #83

sissbruecker opened this issue Sep 1, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sissbruecker
Copy link
Collaborator

As a developer I would like to see both, unhandled and handled errors as part of a trace. Currently our instrumentations are only built to record unhandled exceptions. However a likely pattern that developers might follow in views is to run an operation due to an event, and then catch + log errors from that operation, while showing the user some error notification. With access to application logs they can still see these errors, however with our solution that would not be the case.

We should consider enriching our traces with error logs at least. Logged errors would be recorded as events on traces, ideally on the current span, rather than the root span. This would require instrumenting specific logging libraries, like log4j or logback. OTel has existing instrumentations for both which could be checked to get an idea on how to make this work.

Depending on how the error handling in an application works (catch + log, catch + log + rethrow) we might want to make this optional as otherwise the error might be recorded multiple times.

@heruan heruan added the enhancement New feature or request label Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants