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

Every event the Honeybadger Python package sends to Insights when instrumentation is enabled: Django, Flask, and ASGI requests, database queries, and Celery tasks. Each entry lists the event's fields with their types, and links to its raw JSON Schema.

**5** events emitted by [`honeybadger-python`](https://docs.honeybadger.io/lib/python/).

***

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

An ASGI app finished handling an HTTP request. Used by FastAPI, Starlette, and similar frameworks.

| Field        | Type    | Description                                                                                   |
| ------------ | ------- | --------------------------------------------------------------------------------------------- |
| `event_type` | string  | Allowed value: `asgi.request`.                                                                |
| `path`       | string  | Request path from the ASGI scope.                                                             |
| `method`     | string  | HTTP method, e.g. "GET", "POST".                                                              |
| `status`     | integer | HTTP response status code.                                                                    |
| `duration`   | number  | Request duration in milliseconds.                                                             |
| `params`     | object  | Parsed query string params. Only present when include\_params is enabled in insights\_config. |
| `params.*`   | any     | Additional caller-defined keys.                                                               |
| `request_id` | string  | Request ID from event context, if set.                                                        |

Example

```json
{
  "event_type": "asgi.request",
  "path": "/users/123",
  "method": "GET",
  "status": 200,
  "duration": 23.4567,
  "params": {
    "page": "2",
    "sort": "name"
  },
  "request_id": "1f9f6f1a-2b3c-4d5e-8f6a-7b8c9d0e1f2a"
}
```

### celery.task\_finished[](https://docs.honeybadger.io/insights/event-types/python/celery.task_finished/ "View event details")[](https://docs.honeybadger.io/insights/event-types/python/celery.task_finished.schema.json "View JSON Schema")

A Celery task finished, whether it succeeded or failed.

| Field        | Type        | Description                                                                                        |
| ------------ | ----------- | -------------------------------------------------------------------------------------------------- |
| `event_type` | string      | Allowed value: `celery.task_finished`.                                                             |
| `task_id`    | string      | Celery task UUID.                                                                                  |
| `task_name`  | string      | Fully qualified task name, e.g. "myapp.tasks.send\_email".                                         |
| `state`      | string      | Final task state, e.g. "SUCCESS", "FAILURE", "RETRY".                                              |
| `retries`    | integer     | Number of retries so far.                                                                          |
| `group`      | string      | Celery group ID if the task is part of a group.                                                    |
| `duration`   | number      | Task execution duration in milliseconds.                                                           |
| `args`       | array\<any> | Positional task arguments. Only present when include\_args is enabled in insights\_config.         |
| `kwargs`     | object      | Keyword task arguments (filtered). Only present when include\_args is enabled in insights\_config. |
| `kwargs.*`   | any         | Additional caller-defined keys.                                                                    |
| `request_id` | string      | Request ID propagated from the originating request via Celery task headers.                        |

Example

```json
{
  "event_type": "celery.task_finished",
  "task_id": "9c5e8a2f-1b3d-4c6e-9f7a-2d4b6c8e0a1f",
  "task_name": "myapp.tasks.send_email",
  "state": "SUCCESS",
  "retries": 0,
  "group": "5a7d3e9b-8c1f-4b2a-9d6e-3f5a7c9e1b4d",
  "duration": 845.2103,
  "args": [
    "user@example.com"
  ],
  "kwargs": {
    "subject": "Welcome to MyApp"
  },
  "request_id": "1f9f6f1a-2b3c-4d5e-8f6a-7b8c9d0e1f2a"
}
```

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

A database query from the Django ORM or SQLAlchemy. Honeybadger skips queries that match exclude\_queries.

| Field        | Type   | Description                                                                         |
| ------------ | ------ | ----------------------------------------------------------------------------------- |
| `event_type` | string | Allowed value: `db.query`.                                                          |
| `query`      | string | SQL query string. Bind parameters may appear as literals, depending on the driver.  |
| `duration`   | number | Query execution duration in milliseconds.                                           |
| `params`     | any    | Query parameters. Only present when include\_params is enabled in insights\_config. |
| `request_id` | string | Request ID from event context, ties this query to the enclosing request.            |

Example

```json
{
  "event_type": "db.query",
  "query": "SELECT \"users\".* FROM \"users\" WHERE \"users\".\"id\" = %s LIMIT 1",
  "duration": 2.4815,
  "params": [
    123
  ],
  "request_id": "1f9f6f1a-2b3c-4d5e-8f6a-7b8c9d0e1f2a"
}
```

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

A Django view finished handling an HTTP request.

| Field        | Type    | Description                                                                                                                        |
| ------------ | ------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `event_type` | string  | Allowed value: `django.request`.                                                                                                   |
| `path`       | string  | Request path, e.g. "/users/42".                                                                                                    |
| `method`     | string  | HTTP method, e.g. "GET", "POST".                                                                                                   |
| `status`     | integer | HTTP response status code.                                                                                                         |
| `view`       | string  | Resolved view function name.                                                                                                       |
| `module`     | string  | Module containing the view function.                                                                                               |
| `app`        | string  | Django app name from the URL resolver.                                                                                             |
| `duration`   | number  | Request duration in milliseconds.                                                                                                  |
| `params`     | object  | GET and POST params. Only present when include\_params is enabled in insights\_config.                                             |
| `params.*`   | any     | Additional caller-defined keys.                                                                                                    |
| `request_id` | string  | Request ID from X-Request-ID header, request.id/request\_id attribute, or a generated UUID. Set in event context at request start. |

Example

```json
{
  "event_type": "django.request",
  "path": "/users/123",
  "method": "GET",
  "status": 200,
  "view": "user_detail",
  "module": "myapp.views",
  "app": "users",
  "duration": 58.3214,
  "params": {
    "page": "2",
    "sort": "name"
  },
  "request_id": "1f9f6f1a-2b3c-4d5e-8f6a-7b8c9d0e1f2a"
}
```

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

A Flask route finished handling an HTTP request.

| Field        | Type    | Description                                                                                     |
| ------------ | ------- | ----------------------------------------------------------------------------------------------- |
| `event_type` | string  | Allowed value: `flask.request`.                                                                 |
| `path`       | string  | Request path, e.g. "/users/42".                                                                 |
| `method`     | string  | HTTP method, e.g. "GET", "POST".                                                                |
| `status`     | integer | HTTP response status code.                                                                      |
| `view`       | string  | Flask endpoint name (request.endpoint).                                                         |
| `blueprint`  | string  | Flask blueprint name, if the route belongs to one.                                              |
| `duration`   | number  | Request duration in milliseconds.                                                               |
| `params`     | object  | Query and form params. Only present when include\_params is enabled in insights\_config.        |
| `params.*`   | any     | Additional caller-defined keys.                                                                 |
| `request_id` | string  | Request ID from X-Request-ID header or a generated UUID. Set in event context at request start. |

Example

```json
{
  "event_type": "flask.request",
  "path": "/users/123",
  "method": "GET",
  "status": 200,
  "view": "users.show",
  "blueprint": "users",
  "duration": 32.1875,
  "params": {
    "page": "2",
    "sort": "name"
  },
  "request_id": "1f9f6f1a-2b3c-4d5e-8f6a-7b8c9d0e1f2a"
}
```

---

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