honeybadger-io / honeybadger-go

Send Go (golang) panics and errors to Honeybadger.
https://www.honeybadger.io/
MIT License
34 stars 15 forks source link

Request Metrics #13

Closed joshuap closed 8 years ago

joshuap commented 8 years ago

This sends app.request.200, app.request.500, etc. metrics to Honeybadger so that the metrics tab is populated. Traces (slow requests) are not sent yet. This feature is enabled by wrapping your http.Handler in honeybadger.MetricHandler().

joshuap commented 8 years ago

@gaffneyc @smeriwether @kostyantyn @calebthompson @gogolok y'all might be interested in reviewing this (since you have contributed); it's a work in progress. Currently it just adds metrics reporting automatically if you use our http server handler (honeybadger.Handler), but I'm thinking moving metrics to it's own explicit handler (i.e. honeybadger.MetricHandler) might be better, so that it's opt-in.

gaffneyc commented 8 years ago

While I haven't had a chance to review the code, I do think having a separate MetricHandler would be a good move. It allows you to opt-in to the new behavior and should reduce the complexity of the existing handler.