Skip to content

Insights overview

View Markdown

Insights lets you observe what your JavaScript application does in production.

On the server, Honeybadger can record inbound HTTP requests automatically from Express, Fastify, AWS Lambda, and Next.js. You can also send console logs and custom events from your own code, then use BadgerQL to ask questions across the whole event stream. Any field you send is queryable as soon as it arrives, with no schema to define ahead of time.

Enable Insights in your Honeybadger configuration and wire up your framework’s handler or plugin. The client starts recording requests as soon as they arrive.

Honeybadger.configure({
apiKey: process.env.HONEYBADGER_API_KEY,
insights: {
enabled: true,
// Record inbound HTTP requests as request.handled events
http: true,
// Forward console logs to Insights
console: true,
},
});

We capture HTTP requests and console logs automatically.

Send console output to Insights for searching and analysis alongside your other events.

Event context attaches fields to the current request. Once set, every event emitted during that request includes them.

Honeybadger.setEventContext({
checkout_variant: "new",
});

The checkout_variant field is now on every event for that request, including request.handled and any custom events you send.

Custom events record activity the framework cannot see. HTTP instrumentation records a checkout request as a request.handled event, but only your application knows whether the payment was authorized:

Honeybadger.event("payment.authorized", {
payment_provider: payment.provider,
amount: checkout.total,
currency: checkout.currency,
});

When Insights HTTP instrumentation is active, events sent during a request also carry that request’s request_id and correlation_id, so you can join custom events to the surrounding request in BadgerQL.

If some events are noisy or you’d like to reduce quota consumption: