Sending custom events
You can send your own application events to
Honeybadger Insights using the Honeybadger.event method.
(To capture console logs automatically, see
Capturing logs.)
Honeybadger.event("button_click", { action: "buy_now", user_id: 123, product_id: 456,});The first argument is the type of the event (event_type) and the second
argument is an object containing any additional data you want to include.

Honeybadger.event can also be called with a single argument as an object
containing the data for the event:
Honeybadger.event({ event_type: "button_click", action: "buy_now", user_id: 123, product_id: 456,});A timestamp field (ts) will be automatically added to the event data if it is
not provided, regardless of the method overload used to send the event.
When
automatic HTTP instrumentation
is active, events sent during a request on Node.js runtimes also carry that
request’s request_id and correlation_id.