Who monitors what
Where to look when operators report slowness
Compare the back-end latency in your APM with the time the same request takes in the browser (DevTools, Network tab):Monitor the Forest endpoints
Install an APM on the Forest back-end: Datadog, Sentry, New Relic, or OpenTelemetry. Measure latency (P50, P95, P99) and 5xx rate per collection and per operation type, not only per route. A slowlist on one large collection and a slow chart require different fixes.
In your APM, derive the collection and the operation type from these patterns, and attach both as tags. With a
prefix option, the routes start with /{prefix}/forest: for example, prefix: 'admin' gives /admin/forest/{collection}.
Also track:
- Resources: CPU, memory, restarts and out-of-memory (OOM) events of the process or container.
- External calls: trace calls to external APIs as spans, and track the P95 of every computed field or action that calls one.
Track MCP traffic separately
AI agents call the MCP server in bursts: dozens of requests within seconds, then nothing. Its endpoint is/mcp, or <basePath>/mcp when you mount it with a basePath. Keep it in a dedicated dashboard with its own alerts, so these bursts neither trigger your operator alerts nor hide inside their averages.
Send structured logs
Pass a custom logger to the Forest back-end so its logs reach your log platform as JSON. The Node.js back-end already logs one line per request, with the status, method, path and duration, for example[200] GET /forest/users - 42ms.
- Node.js
- Ruby
Set alerts
Set thresholds per operation type, and fire an alert only when the condition lasts. A single slow request is not an incident.
Exclude
export from latency alerts: CSV exports run long by design.
The probe calls the root Forest route, /forest or /{prefix}/forest if you set a prefix:
These thresholds are starting points. Adjust them once you have a baseline for your project.
Monitor the database
Isolate Forest traffic
Connect the Forest back-end with a dedicated database user, and setapplication_name in the connection string. Both let your monitoring tools and pg_stat_activity filter Forest queries from the rest of your traffic.
Enable the slow query log
Track the top Forest queries (PostgreSQL)
On PostgreSQL 13 or later, addpg_stat_statements to shared_preload_libraries, restart PostgreSQL, then run CREATE EXTENSION pg_stat_statements;. List the 10 most expensive queries sent by the Forest user:
EXPLAIN ANALYZE on each of them. Look for sequential scans on large tables and for row estimates far from actual counts. To fix what you find, see Performance.
Capture a baseline and review it
- Before go-live: record the P95 per collection and operation type, and the top 10 queries. This baseline is the reference that proves a fix works.
- Every week: review the top 10 queries with your engineering team.
- After every schema migration: compare against the baseline. Missing indexes on new foreign keys or filtered columns cause most regressions.
Related
Performance
Patterns to speed up computed fields, segments and filters.
Troubleshooting
Common issues and how to fix them.