Skip to content
This guide is for the queue-only version of Edge Worker. Main docs are here

# Observability

## Logging

Section titled “Logging”

Edge Worker logs various events to the console. You can change the log level by setting `EDGE_WORKER_LOG_LEVEL` environment variable:

supabase/functions/.env

    EDGE_WORKER_LOG_LEVEL=debug

Available log levels are:

- `debug`
- `info`
- `error`
- (more will come)

By default, Edge Worker’s log level is `info`.

## Heartbeats

Section titled “Heartbeats”

Edge Worker sends heartbeats every 5 seconds and updates `last_heartbeat_at` column in `pgflow.workers` table.

### List of active workers

Section titled “List of active workers”

In order to get a list of active workers, we need to fetch those that have pinged in the last 6 seconds (+1s to account for delays):

    SELECT *FROM pgflow.workersWHERE last_heartbeat_at > now() - make_interval(secs => 6)