honeybadger-io / honeybadger-python

Send Python and Django errors to Honeybadger.
https://www.honeybadger.io/
MIT License
15 stars 25 forks source link

Allow non error events reporting #169

Closed Kelvin4664 closed 2 months ago

Kelvin4664 commented 3 months ago

We'd like to send some non error events to the Honeybadger events api (https://docs.honeybadger.io/api/reporting-events/), There's no out of the box way to do this in python in a non blocking way (like honeybadger.notify())

Can we have a new method, say honeybadger.send_events() for this purpose?

stympy commented 3 months ago

We definitely would like to add async sending of events to the events API. The method should be honeybadger.event() and it ideally should have a signature like the JS and Ruby libraries that accepts either a dictionary or a string and a dictionary as its arguments (see the JS docs for info on that). The method should add a ts field with the current timestamp to the JSON payload if the caller didn't include a ts in the dictionary.