opentelemetry-erlang icon indicating copy to clipboard operation
opentelemetry-erlang copied to clipboard

Error handling

Open tsloughter opened this issue 3 years ago • 6 comments

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?

tsloughter avatar Nov 02 '20 00:11 tsloughter

Maybe we can use the logger backend to do such a thing?

wingyplus avatar Nov 16 '20 17:11 wingyplus

@wingyplus there is meant to be attachable error handlers, so I think telemetry fits. It could be optional and just log by default though.

tsloughter avatar Nov 16 '20 17:11 tsloughter

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.

hauleth avatar Nov 16 '20 20:11 hauleth

@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.

wingyplus avatar Nov 17 '20 15:11 wingyplus

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.

hauleth avatar Nov 17 '20 16:11 hauleth

I made a ticket for adding the domain to all logs: https://github.com/open-telemetry/opentelemetry-erlang/issues/427

tsloughter avatar Aug 28 '22 18:08 tsloughter