Skip to content

Python event reference

View Markdown
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.
13 events emitted by honeybadger-python.

ASGI

asgi.request

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

FieldTypeDescription
event_typestringAllowed value: asgi.request.
pathstringRequest path from the ASGI scope.
methodstringHTTP method, e.g. "GET", "POST".
statusintegerHTTP response status code.
durationnumberRequest duration in milliseconds.
paramsobjectParsed query string params. Only present when include_params is enabled in insights_config.
params.*anyAdditional caller-defined keys.
request_idstringRequest ID from event context, if set.
Example
{
"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

celery.task_finished

A Celery task finished, whether it succeeded or failed.

FieldTypeDescription
event_typestringAllowed value: celery.task_finished.
task_idstringCelery task UUID.
task_namestringFully qualified task name, e.g. "myapp.tasks.send_email".
statestringFinal task state, e.g. "SUCCESS", "FAILURE", "RETRY".
retriesintegerNumber of retries so far.
groupstringCelery group ID if the task is part of a group.
durationnumberTask execution duration in milliseconds.
argsarray<any>Positional task arguments. Only present when include_args is enabled in insights_config.
kwargsobjectKeyword task arguments (filtered). Only present when include_args is enabled in insights_config.
kwargs.*anyAdditional caller-defined keys.
request_idstringRequest ID propagated from the originating request via Celery task headers.
Example
{
"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"
}

Database

db.query

A database query from the Django ORM or SQLAlchemy. Honeybadger skips queries that match exclude_queries.

FieldTypeDescription
event_typestringAllowed value: db.query.
querystringSQL query string. Bind parameters may appear as literals, depending on the driver.
durationnumberQuery execution duration in milliseconds.
paramsanyQuery parameters. Only present when include_params is enabled in insights_config.
request_idstringRequest ID from event context, ties this query to the enclosing request.
Example
{
"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

django.request

A Django view finished handling an HTTP request.

FieldTypeDescription
event_typestringAllowed value: django.request.
pathstringRequest path, e.g. "/users/42".
methodstringHTTP method, e.g. "GET", "POST".
statusintegerHTTP response status code.
viewstringResolved view function name.
modulestringModule containing the view function.
appstringDjango app name from the URL resolver.
durationnumberRequest duration in milliseconds.
paramsobjectGET and POST params. Only present when include_params is enabled in insights_config.
params.*anyAdditional caller-defined keys.
request_idstringRequest ID from X-Request-ID header, request.id/request_id attribute, or a generated UUID. Set in event context at request start.
Example
{
"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

flask.request

A Flask route finished handling an HTTP request.

FieldTypeDescription
event_typestringAllowed value: flask.request.
pathstringRequest path, e.g. "/users/42".
methodstringHTTP method, e.g. "GET", "POST".
statusintegerHTTP response status code.
viewstringFlask endpoint name (request.endpoint).
blueprintstringFlask blueprint name, if the route belongs to one.
durationnumberRequest duration in milliseconds.
paramsobjectQuery and form params. Only present when include_params is enabled in insights_config.
params.*anyAdditional caller-defined keys.
request_idstringRequest ID from X-Request-ID header or a generated UUID. Set in event context at request start.
Example
{
"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"
}

Oban

oban.job_finished

An Oban job finished, whether it succeeded or failed. Emitted for both oban.job.stop and oban.job.exception telemetry events.

FieldTypeDescription
event_typestringAllowed value: oban.job_finished.
job_idintegerOban job database ID.
workerstringFully qualified worker name ("module.Class").
queuestringQueue the job ran on.
statestringResulting job state: "completed", "retryable", "discarded", "cancelled", or "scheduled" (snoozed). Failures are "retryable" until max_attempts is exhausted, then "discarded".
attemptintegerAttempt number (1-based).
max_attemptsintegerMaximum number of attempts before the job is discarded.
durationnumberJob execution duration in milliseconds.
queue_timenumberTime the job spent waiting in the queue (scheduled_at to attempted_at) in milliseconds.
tagsarray<string>Tags assigned to the job.
error_typestringException class name. Only present when the job failed (state "retryable" or "discarded").
error_messagestringException message. Only present when the job failed (state "retryable" or "discarded").
argsobjectJob arguments (filtered). Only present when include_args is enabled in insights_config.
args.*anyAdditional caller-defined keys.
metaobjectJob metadata (filtered). Only present when include_args is enabled in insights_config.
meta.*anyAdditional caller-defined keys.
request_idstringRequest ID propagated from the originating request's event context via Oban job metadata.
Example
{
"event_type": "oban.job_finished",
"job_id": 123456,
"worker": "myapp.workers.WelcomeEmail",
"queue": "default",
"state": "completed",
"attempt": 1,
"max_attempts": 20,
"duration": 845.2103,
"queue_time": 12.5,
"tags": [
"mailer"
],
"error_type": "ValueError",
"error_message": "invalid user id",
"args": {
"user_id": 42
},
"meta": {
"source": "signup"
},
"request_id": "1f9f6f1a-2b3c-4d5e-8f6a-7b8c9d0e1f2a"
}

oban.leader_exception

Oban's leader election loop raised an exception.

FieldTypeDescription
event_typestringAllowed value: oban.leader_exception.
loopstringName of the Oban maintenance loop that raised. Allowed value: leader.
eventstringThe underlying Oban telemetry event name. Allowed values: oban.leader.election.exception.
error_typestringException class name.
error_messagestringException message.
durationnumberDuration of the failed loop iteration in milliseconds.
Example
{
"event_type": "oban.leader_exception",
"loop": "leader",
"event": "oban.leader.election.exception",
"error_type": "OperationalError",
"error_message": "connection to server was lost",
"duration": 3.1415
}

oban.lifeline_exception

Oban's lifeline loop, which rescues orphaned executing jobs, raised an exception.

FieldTypeDescription
event_typestringAllowed value: oban.lifeline_exception.
loopstringName of the Oban maintenance loop that raised. Allowed value: lifeline.
eventstringThe underlying Oban telemetry event name. Allowed values: oban.lifeline.rescue.exception.
error_typestringException class name.
error_messagestringException message.
durationnumberDuration of the failed loop iteration in milliseconds.
Example
{
"event_type": "oban.lifeline_exception",
"loop": "lifeline",
"event": "oban.lifeline.rescue.exception",
"error_type": "OperationalError",
"error_message": "connection to server was lost",
"duration": 3.1415
}

oban.producer_exception

An Oban queue producer raised an exception while fetching or acking jobs.

FieldTypeDescription
event_typestringAllowed value: oban.producer_exception.
loopstringName of the Oban maintenance loop that raised. Allowed value: producer.
eventstringThe underlying Oban telemetry event name. Allowed values: oban.producer.get.exception, oban.producer.ack.exception.
error_typestringException class name.
error_messagestringException message.
durationnumberDuration of the failed loop iteration in milliseconds.
Example
{
"event_type": "oban.producer_exception",
"loop": "producer",
"event": "oban.producer.get.exception",
"error_type": "OperationalError",
"error_message": "connection to server was lost",
"duration": 3.1415
}

oban.pruner_exception

Oban's pruner loop, which deletes old completed jobs, raised an exception.

FieldTypeDescription
event_typestringAllowed value: oban.pruner_exception.
loopstringName of the Oban maintenance loop that raised. Allowed value: pruner.
eventstringThe underlying Oban telemetry event name. Allowed values: oban.pruner.prune.exception.
error_typestringException class name.
error_messagestringException message.
durationnumberDuration of the failed loop iteration in milliseconds.
Example
{
"event_type": "oban.pruner_exception",
"loop": "pruner",
"event": "oban.pruner.prune.exception",
"error_type": "OperationalError",
"error_message": "connection to server was lost",
"duration": 3.1415
}

oban.refresher_exception

Oban's refresher loop, which refreshes producer records and cleans up stale ones, raised an exception.

FieldTypeDescription
event_typestringAllowed value: oban.refresher_exception.
loopstringName of the Oban maintenance loop that raised. Allowed value: refresher.
eventstringThe underlying Oban telemetry event name. Allowed values: oban.refresher.refresh.exception, oban.refresher.cleanup.exception.
error_typestringException class name.
error_messagestringException message.
durationnumberDuration of the failed loop iteration in milliseconds.
Example
{
"event_type": "oban.refresher_exception",
"loop": "refresher",
"event": "oban.refresher.refresh.exception",
"error_type": "OperationalError",
"error_message": "connection to server was lost",
"duration": 3.1415
}

oban.scheduler_exception

Oban's cron scheduler loop raised an exception while evaluating schedules.

FieldTypeDescription
event_typestringAllowed value: oban.scheduler_exception.
loopstringName of the Oban maintenance loop that raised. Allowed value: scheduler.
eventstringThe underlying Oban telemetry event name. Allowed values: oban.scheduler.evaluate.exception.
error_typestringException class name.
error_messagestringException message.
durationnumberDuration of the failed loop iteration in milliseconds.
Example
{
"event_type": "oban.scheduler_exception",
"loop": "scheduler",
"event": "oban.scheduler.evaluate.exception",
"error_type": "OperationalError",
"error_message": "connection to server was lost",
"duration": 3.1415
}

oban.stager_exception

Oban's stager loop, which moves scheduled jobs to available, raised an exception.

FieldTypeDescription
event_typestringAllowed value: oban.stager_exception.
loopstringName of the Oban maintenance loop that raised. Allowed value: stager.
eventstringThe underlying Oban telemetry event name. Allowed values: oban.stager.stage.exception.
error_typestringException class name.
error_messagestringException message.
durationnumberDuration of the failed loop iteration in milliseconds.
Example
{
"event_type": "oban.stager_exception",
"loop": "stager",
"event": "oban.stager.stage.exception",
"error_type": "OperationalError",
"error_message": "connection to server was lost",
"duration": 3.1415
}