You can now send events to Honeybadger Insights from our Elixir client library. Use the Honeybadger.event/1
function to send event data to the events API. A ts
field with the current timestamp will be added to the data if it isn't provided:
Honeybadger.event(%{
event_type: "user_created",
user: user.id
})
You can also use Honeybadger.event/2
, which accepts a string as the first parameter and adds that value to the event_type
field in the map before being sent to the API:
Honeybadger.event("user_created", %{
user: user.id
})
You can find these events with the following BadgerQL query:
fields @ts, @preview
| filter event_type::str == "user_created"
| sort @ts
This is just the first step towards supporting logging and performance monitoring in Elixir!