Skip to content

Monitoring

Lyra always writes logs. Health checks and the request id are always on too. Sentry and Datadog are optional, and Lyra sends them nothing until you set them up.

What Needs
Logs Nothing
Health checks Nothing
Sentry: errors, traces and logs SENTRY_DSN
Datadog: traces, metrics and logs DATADOG_ENABLED, DD_API_KEY and the Datadog agent

Lyra writes JSON logs to stdout, one line for anything worth knowing later: a sign-in, an import that finished, an AI agent’s tool call, a setting that changed. With LOG_LEVEL=debug it also writes a line when each request starts and finishes.

Terminal window
docker compose logs -f lyra

Logs hold ids, never contents: no page titles, page text, search text, secrets or public link addresses, and only the domain of an email address.

Address Answers
/health 200 whenever Lyra is running
/ready 200 when Lyra can reach Postgres, and Redis if it uses one. 503 otherwise

Both answer on any host and aren’t rate limited, so a load balancer or uptime check can call them. deploy/compose.yml uses /ready to know when Lyra has started.

Every response has an X-Request-Id header. When someone reports a problem, that id finds every log line of their request.

Setting What it does
SENTRY_DSN Where server errors, traces and logs go
SENTRY_WEB_DSN Where web app errors go, along with problem reports people send from the app and agents send with send_feedback. Empty uses SENTRY_DSN
SENTRY_TRACES_SAMPLE_RATE How many requests and jobs Sentry traces, from 0 to 1. The default, 1, traces every one
DEPLOY_ENV This server’s name in Sentry, like production

Every error log becomes a Sentry issue. A trace shows the route, each SQL statement and how long it took, with its values replaced by ?.

Sentry gets ids, never contents. Lyra turns off Sentry’s collection of cookies, headers, request bodies, query strings and user details. The web app sends its reports through Lyra’s own server. It records the screen of one session in ten, and of every session that hits an error, with all text and images hidden.

  1. In deploy/.env, set DATADOG_ENABLED=true, DD_API_KEY and, outside Datadog’s US1 site, DD_SITE.
  2. Add datadog to COMPOSE_PROFILES, so the Datadog agent starts next to Lyra.
  3. Run docker compose up -d.

Lyra then sends traces, lyra.* metrics and Node.js runtime stats to the agent, and the agent sends Lyra’s logs. DEPLOY_ENV names the server in Datadog.

To add Lyra’s dashboard and monitors to your Datadog account, run this from a copy of Lyra’s code with Node 24 and pnpm, and with DD_API_KEY and DD_APP_KEY set:

Terminal window
make datadog-apply DATADOG_ENV=production

It creates them from deploy/datadog/. make datadog-check shows what it would change without changing anything.