Find the logs
Files rotate daily and are deleted after 30 days.
Follow one request
Every API response has anx-trace-id header. That id is on every log line the request produced, including background work it started.
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 withlog.set:
WideEventFields (libs/shared/py/wide_events.py) so queries work across endpoints.
Rules of thumb
Rules of thumb
- Use
log.set()overlog.info(). Info lines never reach the wide event. - Pass structured kwargs, not f-strings, for anything you might filter on.
- Call
log.audit()on auth, payments, and PII writes. - Never swallow exceptions. Log or re-raise.
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.service, container, level, and logger_name are labels. Everything else lives in the JSON body, so add | json.
More LogQL recipes
More LogQL recipes
Server errors:One user’s requests:Slow chat requests:Failed units of work by name:Audit trail:
Observability score in CI
Observability score in CI
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.

