Observability
Charts of who reaches your project and how it responds, and the logs of every service, searchable by field or with SQL.
There is nothing to instrument. Every request that reaches your project, every Edge Function run and every message sent is recorded as it happens. The console shows it in two places: Observability, with charts, and Logs, with the individual records.
Charts
Observability in the project charts the selected period, with filters:
AudienceDistinct users active each day, and when in the week they are most active.
TrafficRequest volume, by status code and by path.
PerformanceLatency and error rate.
NetworkData in and out of the project, including calls to third-party services.
Logs
Logs lists records from each service the project uses, newest first:
All logsEvery source together.
RequestsOne record per request: method, path, status, latency, sizes, client and the user who made it.
FunctionsWhat your Edge Functions write with console,
and each run's latency and memory.
NotificationsEach email and SMS: template, destination, language, provider and result.
SystemWhat the platform does for the project, such as builds.
Open a record to see its details. From there, Show this trace lists every record with the same track id, which follows one operation across services, and Show logs from this user narrows everything to that user.
Logs can take a few minutes to appear.
Search
The search box takes a field, a colon and a value. Combine conditions with
AND, OR and NOT:
level:(error, fatal)
metadata.http.response.status:>=500
metadata.timing.latency:>1000
message:*timeout* AND NOT service:api-gatewayfield:valuefield:"two words"field:*text*field:text* starts with.field:(a, b)field:>=500>, < and <=.field:[400 TO 499]field:*The fields you will use most:
leveltrace, debug, info, warn, error or fatal.messageservice · sourceenvironmenttrack_idmetadata.http.request.method · metadata.http.request.pathmetadata.http.response.statusmetadata.timing.latencymetadata.identity.user.idSQL
In organizations with SQL queries enabled, Query also takes SQL against a
read-only logs table. Queries stop after 10 seconds.
SELECT metadata->'http'->'request'->>'path' AS path,
round(avg((metadata->'timing'->>'latency')::numeric)) AS avg_ms,
count(*) AS requests
FROM logs
WHERE metadata->'timing'->>'latency' IS NOT NULL
AND timestamp > now() - interval '24 hours'
GROUP BY path
ORDER BY avg_ms DESC
LIMIT 20The columns are timestamp, level, message, service, service_version,
source, environment, track_id, metadata (JSON) and id.
What a record says about the caller
The user and session on a request record come from the access token the caller
sent, read without checking its signature. They show who the token claims to
be, which is what you need to follow a user's requests, but they are not proof
of identity. Your code proves it with
verify.
Values of sensitive query parameters, such as token, code, otp,
password and client_secret, are masked before the record is written.
Retention
How long logs are kept depends on the organization's plan:
FreeProScaleEnterprise