Correlating Sessions with Errors and Requests
Link errors and requests back to the session that produced them.
Automatic Correlation
When session tracking is enabled, every log, error, and request from that session automatically includes the session_id. This means:
- In the Errors page, each error shows which sessions were affected.
- In the Requests page, you can filter by session ID.
- In the Session detail, you see all errors and requests inline.
Finding the Session for an Error
From an error detail page:
- Look at the Occurrences tab.
- Each occurrence shows the session ID.
- Click the session ID to jump to that session's timeline.
Finding Errors in a Session
From a session detail page, errors are highlighted in red in the timeline. Click any error to see its full stack trace and AI analysis.
Cross-Service Sessions
For backend services, pass the session ID from the frontend to your API:
JavaScript
// Frontend
fetch('/api/checkout', {
headers: { 'X-Session-Id': sessionId },
});
// Backend middleware
app.use((req, res, next) => {
Lognitor.setSession(req.headers['x-session-id']);
next();
});This links frontend and backend logs into a single session view.