Skip to content

Sending events

Honeybadger’s Go package can be used to send events to Honeybadger Insights.

Use honeybadger.Event() to send custom events:

honeybadger.Event("user_login", map[string]any{
"user_id": 123,
"email": "user@example.com",
})

The first argument is the event type, and the second is a map of event data.

Events are batched and sent asynchronously for optimal performance.

You can configure batching, retries, and throttling behavior. See Configuration for details on the following options:

OptionDefaultDescription
EventsBatchSize1000Maximum events per batch
EventsTimeout30 secondsRequest timeout
EventsMaxQueueSize100000Maximum events to queue
EventsMaxRetries3Maximum retry attempts
EventsThrottleWait60 secondsWait time before retrying
EventsDropLogInterval60 secondsInterval for logging dropped events