Skip to main content
Find out what a GAIA process did, starting from its structured JSON logs.

Find the logs

Files rotate daily and are deleted after 30 days.

Follow one request

Every API response has an x-trace-id header. That id is on every log line the request produced, including background work it started.
To list every error:

Wide events

GAIA writes one rich event per unit of work (an HTTP request, a worker job, a WebSocket connection) instead of many small lines. Add context to the current event with log.set:
Use the namespaces in WideEventFields (libs/shared/py/wide_events.py) so queries work across endpoints.
  1. Use log.set() over log.info(). Info lines never reach the wide event.
  2. Pass structured kwargs, not f-strings, for anything you might filter on.
  3. Call log.audit() on auth, payments, and PII writes.
  4. Never swallow exceptions. Log or re-raise.
Every line carries time, level, env, service, commit, logger, and message. Every event adds task, trace_id, duration_ms, outcome, and errors[], warnings[], audit[] arrays. Python services and the TypeScript bots share these key names. The wide-event-conformance CI lane (scripts/ci/wide-event-conformance/run.py) fails if they drift.

Query Loki (GAIA Cloud)

The observability compose profile needs config files from the team’s private infra repo. From a public checkout, read the local JSON files instead.
Logs are searched in Grafana with LogQL. Only service, container, level, and logger_name are labels. Everything else lives in the JSON body, so add | json.
Server errors:
One user’s requests:
Slow chat requests:
Failed units of work by name:
Audit trail:
Bare | json drops arrays, so errors != "[]" matches every line. Read into an array with | json first_error="errors[0].msg". When a parsed field collides with a label, the label wins and the parsed value gets an _extracted suffix.
python3 tools/evlog_map scores every API and voice entry point on wide-event instrumentation. node scripts/ci/checks.mjs evlog-map-bots scores the bots. The observability-* checks of ci.yml’s lint-mixed job fail if the score regresses. See tools/evlog_map/README.md.

Next

Open a pull request

The checklist, the commit format and what happens in review.