Skip to main content
The Forest back-end runs in your infrastructure. The Forest UI calls it directly from your operators’ browsers, and your data never transits through Forest servers. Forest therefore has no view of what happens inside your back-end or your database: that visibility sits on your side.

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 slow list 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.

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:
A successful probe confirms that the back-end process answers. It does not test the database connection: monitor database availability separately.
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 set application_name in the connection string. Both let your monitoring tools and pg_stat_activity filter Forest queries from the rest of your traffic.
Add a statement timeout on that user, so that a single Forest query cannot degrade production:
The setting applies to new sessions only: restart the Forest back-end, or recycle its database connection pool, so pooled connections pick it up.
A 30-second timeout interrupts CSV exports and charts over large tables that legitimately run longer. Measure your longest expected queries first, then set the timeout above them, or serve exports and heavy charts from a read replica with a higher limit.
Run the Forest back-end in the same region as the database, with a connection pool sized for the expected load.

Enable the slow query log

Track the top Forest queries (PostgreSQL)

On PostgreSQL 13 or later, add pg_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:
Run 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.

Performance

Patterns to speed up computed fields, segments and filters.

Troubleshooting

Common issues and how to fix them.