---
title: JavaScript event reference
description: Insights event types emitted by JavaScript.
url: https://docs.honeybadger.io/insights/event-types/js/
---

Every event the Honeybadger JavaScript client sends to Insights when instrumentation is enabled: inbound HTTP requests from Express, Fastify, and AWS Lambda (@honeybadger-io/js) and Next.js (@honeybadger-io/nextjs), and console log messages. Each entry lists the event's fields with their types, and links to its raw JSON Schema.

**2** events emitted by [`@honeybadger-io/js`](https://docs.honeybadger.io/lib/javascript/), [`@honeybadger-io/nextjs`](https://docs.honeybadger.io/lib/javascript/integration/nextjs/).

***

### log[](https://docs.honeybadger.io/insights/event-types/js/log/ "View event details")[](https://docs.honeybadger.io/insights/event-types/js/log.schema.json "View JSON Schema")

A console log message forwarded to Insights when insights.console is enabled.

| Field        | Type        | Description                                                                                  |
| ------------ | ----------- | -------------------------------------------------------------------------------------------- |
| `event_type` | string      | Allowed value: `log`.                                                                        |
| `severity`   | string      | Console method that produced the message, e.g. "log", "info", "warn", "error", "debug".      |
| `message`    | string      | First argument when it is a string. Omitted when the first argument is not a string.         |
| `args`       | array\<any> | Remaining console arguments when the first argument is a string, or all arguments otherwise. |

Example

```json
{
  "event_type": "log",
  "severity": "info",
  "message": "User signed in",
  "args": [
    123,
    {
      "ok": true
    }
  ]
}
```

### request.handled[](https://docs.honeybadger.io/insights/event-types/js/request.handled/ "View event details")[](https://docs.honeybadger.io/insights/event-types/js/request.handled.schema.json "View JSON Schema")

An inbound HTTP request finished. Emitted by the Express, Fastify, and AWS Lambda integrations in @honeybadger-io/js, and by withHoneybadger in @honeybadger-io/nextjs, when insights.http is enabled.

| Field            | Type           | Description                                                                                                                                                |
| ---------------- | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `event_type`     | string         | Allowed value: `request.handled`.                                                                                                                          |
| `method`         | string         | HTTP method, e.g. "GET", "POST".                                                                                                                           |
| `path`           | string         | Request path.                                                                                                                                              |
| `route`          | string \| null | Matched route pattern when the framework provides one (for example Express `req.route.path` or Fastify `req.routeOptions.url`). Not set for AWS Lambda.    |
| `status`         | integer        | HTTP response status code.                                                                                                                                 |
| `duration`       | integer        | Request duration in milliseconds.                                                                                                                          |
| `request_id`     | string         | Unique ID for this request. Read from the `x-request-id` or `request-id` header, or generated when neither is present. Merged from event context.          |
| `correlation_id` | string         | ID that may span related requests. Read from the `x-correlation-id` or `x-amzn-trace-id` header, or falls back to `request_id`. Merged from event context. |

Example

```json
{
  "event_type": "request.handled",
  "method": "GET",
  "path": "/users/123",
  "route": "/users/:id",
  "status": 200,
  "duration": 42,
  "request_id": "f3b2c1d0-4e5a-4b6c-8d7e-9f0a1b2c3d4e",
  "correlation_id": "f3b2c1d0-4e5a-4b6c-8d7e-9f0a1b2c3d4e"
}
```

---

## 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/)
