---
title: Insights overview
description: Query automatic HTTP request instrumentation, console logs, and custom application events from JavaScript in Honeybadger Insights.
url: https://docs.honeybadger.io/lib/javascript/insights/
---

[Insights](https://docs.honeybadger.io/guides/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](https://docs.honeybadger.io/guides/insights/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.

## Start with automatic instrumentation

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.

```javascript
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,
  },
});
```

[Automatic instrumentation](https://docs.honeybadger.io/lib/javascript/insights/automatic-instrumentation/)Configure HTTP instrumentation for Express, Fastify, Lambda, and Next.js.

We capture HTTP requests and console logs automatically.

[JavaScript event reference](https://docs.honeybadger.io/insights/event-types/js/)See every JavaScript event type and field.

## Capture console logs

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

[Capturing logs](https://docs.honeybadger.io/lib/javascript/insights/capturing-logs/)Forward console logs with insights.console.

## Add application context

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

```javascript
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.

[Event context](https://docs.honeybadger.io/lib/javascript/insights/event-context/)Set, clear, and merge per-request metadata.

## Record application events

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:

```javascript
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.

[Sending custom events](https://docs.honeybadger.io/lib/javascript/insights/sending-events-to-insights/)The full Honeybadger.event API.

## Manage event volume

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

[Filtering events](https://docs.honeybadger.io/lib/javascript/insights/filtering-events/)Inspect, modify, or drop events with beforeEvent.

[Sampling events](https://docs.honeybadger.io/lib/javascript/insights/sampling-events/)Send only a percentage of events.

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
