opentelemetry-erlang
opentelemetry-erlang copied to clipboard
Error handling
There are some details in the spec about error handling https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/error-handling.md
I think we may want to use telemetry
to signal certain types of errors for the user to handle but I haven't looked at it closely enough to say for sure yet.
Thoughts?
Maybe we can use the logger backend to do such a thing?
@wingyplus there is meant to be attachable error handlers, so I think telemetry
fits. It could be optional and just log by default though.
If I understand the Java example correctly, then we can just use Erlang's logger and call it a day, as it supports all we need. Maybe with some helper functions for attaching the filters.
@wingyplus there is meant to be attachable error handlers, so I think
telemetry
fits. It could be optional and just log by default though.
Sound interesting. I just thought that we already use logger, that would be easier to do this. And there is needs to add telemetry execution in the code before doing this if we want to go to telemetry way?
If I understand the Java example correctly, then we can just use Erlang's logger and call it a day, as it supports all we need. Maybe with some helper functions for attaching the filters.
If I understand correctly, we can add logger backend and trap error level and setting the filter on top of the backend.
If I understand correctly, we can add logger backend and trap error level and setting the filter on top of the backend.
Better, we can use domain filtering for that.
I made a ticket for adding the domain to all logs: https://github.com/open-telemetry/opentelemetry-erlang/issues/427