Feuerlabs / exometer_core

Core components of exometer
Mozilla Public License 2.0
193 stars 121 forks source link

`exometer_report` gen_server doesn't restart reporters after restarting by supervisor. #85

Open surik opened 8 years ago

surik commented 8 years ago

exometer_report may be terminated by some reason and it also terminates all reporters. Should they be restarted together with exometer_report gen_server?

surik commented 8 years ago

For example, exometer_report gen_server may be crashed here during reporting function metric if my function callback does something like throw(timeout)

uwiger commented 8 years ago

PR #74 refers to this problem.

surik commented 8 years ago

@uwiger good! What do you think about that https://github.com/Feuerlabs/exometer_core/blob/master/src/exometer_function.erl#L232 only catches error class exceptions? It may be reason of reaching max restarts.

uwiger commented 8 years ago

Well ... I guess it wouldn't hurt to also catch other categories, even though the likelihood of get_value() raising other exceptions should be very low. :)

beano commented 8 years ago

I've seen this too. Maybe issue https://github.com/Feuerlabs/exometer_core/issues/36 is also related?