Skip to content

Monitoring & Error Logging

LaunchKit Pro includes a local monitoring foundation — no paid error-tracking service (Sentry, Datadog, New Relic, Grafana, etc.) required.

What it does

  • In-memory ring buffers for recent HTTP requests and errors
  • Admin dashboard at /admin/monitoring with KPI cards, charts, and tables
  • Summary metrics: success rate, status code mix, top routes, request timeline
  • Runtime status: uptime, memory, Node version, app version
  • Server logs retain full stack traces; API/UI responses never expose secrets

Environment variables

env
MONITORING_ENABLED=true
LOG_LEVEL=info
ERROR_LOGGING_ENABLED=true
ERROR_LOG_RETENTION_DAYS=14
REQUEST_LOGGING_ENABLED=true
REQUEST_LOG_SLOW_MS=1000
REQUEST_LOG_RING_BUFFER_SIZE=300
ERROR_LOG_RING_BUFFER_SIZE=200
VariableDefaultDescription
MONITORING_ENABLEDtrueMaster switch for monitoring store and admin APIs
LOG_LEVELinfoNestJS log level (debug, info, warn, error)
ERROR_LOGGING_ENABLEDtrueCapture safe error summaries into the buffer
ERROR_LOG_RETENTION_DAYS14Documented retention hint (in-memory ring buffer is primary)
REQUEST_LOGGING_ENABLEDtrueCapture safe request metadata into the buffer
REQUEST_LOG_SLOW_MS1000Mark requests at or above this duration as slow
REQUEST_LOG_RING_BUFFER_SIZE300Max recent requests kept in memory
ERROR_LOG_RING_BUFFER_SIZE200Max recent errors kept in memory

Set MONITORING_ENABLED=false to disable admin monitoring APIs and the in-memory store.

Admin API

EndpointDescription
GET /admin/monitoring/statusService health, uptime, memory, logging flags
GET /admin/monitoring/summaryAggregated metrics, timeline, top routes
GET /admin/monitoring/errorsRecent safe error summaries
GET /admin/monitoring/requestsRecent buffered HTTP requests
POST /admin/monitoring/clearClear in-memory buffer (admin only; blocked for demo read-only)

All routes require platform admin access.

Admin UI

Open Admin → Monitoring (/admin/monitoring):

  1. KPI cards — API status, success rate, requests, errors, slow requests, latency, uptime, memory
  2. Charts — request timeline, status code mix, top routes, latency overview
  3. Tables — recent errors and requests with filters (All, Errors, Slow, 4xx, 5xx)
  4. Refresh — manual refresh with spinner; optional auto-refresh every 30 seconds
  5. Clear buffer — confirmation required; disabled for read-only demo admin

Admin Overview includes an Open Monitoring shortcut with live success rate and error count when available.

What is tracked (safe metadata)

  • HTTP method, path (query string stripped), status code, duration
  • Timestamp, request ID, user ID, workspace ID (when available)
  • Error message and error name (friendly text for 5xx)

What is never stored or returned

  • Request bodies
  • Authorization headers, cookies, tokens
  • API keys, license keys, webhook secrets, env values
  • Full stack traces in admin API responses (stacks remain in server logs only)

Server logs

For deep debugging, use your process manager or container logs (pm2 logs, journalctl, Docker logs). The monitoring dashboard complements — but does not replace — server-side logging.

Demo mode

  • Demo admins can view all monitoring pages and APIs
  • Clear buffer is blocked with: “Demo admin is read-only.”

Upgrading later

The in-memory store is intentionally lightweight. Buyers can add Sentry, Datadog, or similar by extending MonitoringStoreService without changing admin UI contracts.

LaunchKit Pro by LaunchKit Labs — buyer documentation. No secrets in this site.