Monitoring
Use request logs and metrics to track your services and investigate failures.
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:
- Navigate to your project
- Select a service
- Click the Requests tab
The list shows all incoming requests. Forte highlights requests that returned a 5xx error so you can find failures quickly.
Click any request below to see its correlated logs — this is how the actual Forte interface works.
| Timestamp | Method | Path | Status | Latency (ms) |
|---|---|---|---|---|
| Feb 12, 03:45:18 | GET | /api/users | 200 | 45.20 |
| Feb 12, 03:45:19 | POST | /api/orders | 201 | 89.50 |
| Feb 12, 03:45:20 | GET | /api/products/123 | 200 | 32.10 |
| Feb 12, 03:45:23 | POST | /api/checkout | 500 | 1250.80 |
| Feb 12, 03:45:25 | GET | /api/cart | 200 | 28.30 |
| Feb 12, 03:45:27 | POST | /api/webhooks/stripe | 422 | 156.20 |
| Feb 12, 03:45:28 | GET | /health | 200 | 12.50 |
| Feb 12, 03:45:30 | GET | /api/orders | 200 | 51.70 |
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:
- More accurate, requires onboarding: A request ID included in every log line
- 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:
# 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 timeoutForte 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:
requestIdrequest_idrequest-idx-request-id
The key and value can be separated by =, :, or a space. The value must contain only letters, numbers, and hyphens.
# All of these are recognized
requestId=abc123-def456
request_id: abc123-def456
x-request-id abc123-def456
[INFO] requestId=abc123-def456 user login successfulNode.js (Express)
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)
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)
@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}:
<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.