sbarbase
Contents

Logs and metrics

Each environment's page in the console shows how it is used and what its services said, so you can see a failing request without logging in to the server.

Usage

Every member of the client sees Usage on the environment's page:

The gateway counts requests in memory. A restart of Sbarbase starts the counts again, and nothing older than an hour is kept.

Logs

Owners and admins also see Logs. Choose a source:

Errors only keeps failed requests, or lines that look like errors or warnings.

Before a line leaves the server, keys, tokens, passwords, signed JWTs, OAuth codes and database passwords are replaced with [redacted]. Service logs can still name users' email addresses and your tables, which is why viewers do not see them.

CI uses an environment through supabase-js on a clean machine with every change, then reads its usage and every log source and checks that no key or token appears in any answer (evidence).

From a script

The same data is available through the management API with an operator token:

curl -H "Authorization: Bearer $TOKEN" "$CONSOLE/management/v1/environments/$ID/metrics"
curl -H "Authorization: Bearer $TOKEN" "$CONSOLE/management/v1/environments/$ID/logs?source=auth&lines=100&errors=1"

See the API reference for the fields. lines takes 1 to 1000, 200 when left out.

With a personal access token, an AI agent reads the request, Auth, Storage, Realtime and Edge Functions logs through the MCP get_logs tool or GET /v1/projects/{ref}/analytics/endpoints/logs (AI agents). On the server, sbarbase logs shows a service's own log, unfiltered (the sbarbase command).

Limits

Edit on GitHub