Monitoring

Use request logs and metrics to track your services and investigate failures.

Monitoring covers Services

Forte captures request logs and metrics for Services, which are proxied through the Forte gateway. Websites — including server-rendered (SSR) websites — are served directly and don't pass through the gateway, so Forte doesn't capture per-request logs or metrics for them.

Viewing logs

Request logs

Forte captures every HTTP request to your service — the method, path, status code, and latency. Request and response body capture is on by default in Sandbox (Test) Mode projects and off by default in live projects. Change it per service in the service settings.

To view your request logs:

  1. Navigate to your project
  2. Select a service
  3. Click the Requests tab

The list shows all incoming requests. Forte highlights requests that returned a 5xx error so you can find failures quickly.

Try it yourself

Click any request below to see its correlated logs — this is how the actual Forte interface works.

All Requests
MethodPathStatus
GET/api/users200
POST/api/orders201
GET/api/products/123200
POST/api/checkout500
GET/api/cart200
POST/api/webhooks/stripe422
GET/health200
GET/api/orders200
👆 Click any request above to see its logs

For each request you can inspect:

  • Request & response headers and body
  • All log lines written during that request (INFO, WARN, ERROR)
  • Latency breakdown (total, target, integration)
  • User context if the request was authenticated

How Forte correlates logs

Forte correlates logs with requests in two ways:

  1. More accurate, requires onboarding: A request ID included in every log line
  2. Default option: The timestamps of the request and log lines, matched together

If your service receives many concurrent requests, onboard to request ID correlation so logs match requests accurately. Forte provides the request ID in the X-Forte-Request-Id header and extracts request IDs from your logs when you include them in your log lines.

Log levels

Forte recognizes four log levels: ERROR, WARN, INFO, and DEBUG. Forte detects a level when it appears anywhere in the log line, as a plain word or in brackets:

javascript
# All of these are recognized
[ERROR] Failed to connect to database
INFO: Server started on port 3000
2024-01-15 DEBUG request received
WARN - retrying after timeout

Forte classifies log lines without a recognized level as INFO. It also treats levels like TRACE, FATAL, and CRITICAL as INFO.

Level detection is case-insensitive, so error, Error, and ERROR are treated the same.

Request ID correlation

The examples below run inside your Forte Service — server-side code that Forte calls on behalf of your users.

Forte injects a unique request ID into every inbound request in the X-Forte-Request-Id header. For accurate log correlation, read this header and include its value in each log line you write while handling the request.

Forte recognizes these key names in your log output:

  • requestId
  • request_id
  • request-id
  • x-request-id

The key and value can be separated by =, :, or a space. The value must contain only letters, numbers, and hyphens.

javascript
# All of these are recognized
requestId=abc123-def456
request_id: abc123-def456
x-request-id abc123-def456
[INFO] requestId=abc123-def456 user login successful

Node.js (Express)

js
app.use((req, res, next) => {
  req.requestId = req.headers['x-forte-request-id'];
  next();
});
 
// In your route handlers:
console.log(`INFO requestId=${req.requestId} processing order`);

Python (Flask)

python
from flask import request
import logging
 
@app.before_request
def set_request_id():
    g.request_id = request.headers.get('X-Forte-Request-Id')
 
# In your route handlers:
logging.info(f"requestId={g.request_id} processing order")

Java (Spring Boot)

java
@Component
public class RequestIdFilter extends OncePerRequestFilter {
    @Override
    protected void doFilterInternal(HttpServletRequest request,
            HttpServletResponse response, FilterChain chain)
            throws ServletException, IOException {
        String requestId = request.getHeader("X-Forte-Request-Id");
        MDC.put("requestId", requestId);
        try {
            chain.doFilter(request, response);
        } finally {
            MDC.remove("requestId");
        }
    }
}

Then configure your logback pattern to include %X{requestId}:

xml
<pattern>%d{HH:mm:ss} %-5level requestId=%X{requestId} %msg%n</pattern>

Metrics

Navigate to your service's Overview tab to view:

  • Request volume — Total requests over the selected time range
  • Status code distribution — Breakdown by 2xx, 4xx, and 5xx responses
  • Latency percentiles — P50, P90, and P99 response times

These metrics update automatically as new requests arrive.

Search

Search documentation and console pages