Session Tracking
Session tracking helps you understand user behavior by capturing complete user journeys through your application. A session represents a single visit by a user, from the moment they land on your site until they leave or become inactive.
What is a Session?
A session is a period of user activity on your application. OpenObserve automatically:
- Creates a new session when a user first visits your application
- Maintains the session while the user is active
- Ends the session after 15 minutes of inactivity or when the browser is closed
- Associates all user actions, page views, errors, and performance metrics with the session
Sessions Dashboard
The Sessions tab provides a comprehensive view of all user sessions. Each row in the session list represents a unique user session with detailed information.
Session List Columns
The session list displays the following information for each session:
Timestamp
Format: Dec 15, 2025 17:42:20 +05:30
The exact date and time when the session started, shown in the local timezone with timezone offset.
Use cases:
- Identify when users are most active
- Track session timing relative to deployments
- Analyze time-based patterns
User Email
Format: root@example.com
The email address of the user (if user context was set). This helps you:
- Identify specific users experiencing issues
- Track behavior of individual users
- Provide personalized support
Note: User information must be set using openobserveRum.setUser() for this field to be populated.
Time Spent
Format: 5.18 min, 1.46 hr, 15.01 min
The total duration of the session from start to end (or last activity).
Insights:
- Short sessions (< 1 min): Users may not be finding what they need
- Medium sessions (1-10 min): Normal browsing behavior
- Long sessions (> 10 min): Highly engaged users or users struggling with a task
Error Count
Format: 4, 22, 16, 0
The total number of errors that occurred during the session.
Analysis:
- 0 errors: Clean session, good user experience
- 1-5 errors: Minor issues, investigate if pattern emerges
- 5+ errors: Significant problems, high priority to investigate
- Many errors: Critical issues affecting user experience
Action: Click on sessions with high error counts to investigate what went wrong.
Location
Format: India - Unknown · Chrome · Mac OS X
Detailed information about the user's context:
Geographic Location:
- Country flag icon
- Country name
- City (if available, otherwise "Unknown")
Browser Information:
- Browser name (Chrome, Firefox, Safari, Edge, etc.)
- Browser version (shown in detailed view)
Operating System:
- OS name (Mac OS X, Windows, Linux, iOS, Android)
- OS version (shown in detailed view)
Use cases:
- Identify region-specific issues
- Test browser compatibility
- Understand your user demographics
Session Actions
Play Button (▶)
Click the play button next to any session to:
- View the complete session replay
- See all user interactions (clicks, scrolls, navigation)
- Debug errors in context
- Understand user behavior
See Session Replay for more details.
Session Details View
Click on any session row to open the detailed session view, which includes:
Session Overview
- Session ID: Unique identifier for the session
- Duration: Total session length
- Page Views: Number of pages visited
- User Actions: Total number of interactions (clicks, form submissions, etc.)
- Errors: Total errors encountered
User Information
If user context was set, you'll see:
- User ID
- Name
- Custom user attributes
Device and Browser Details
Complete technical information:
- Browser name and version
- Operating system and version
- Device type (Desktop, Mobile, Tablet)
- Screen resolution
- Viewport size
Network Information
- Connection Type: 4G, WiFi, Ethernet, etc.
- Effective Connection Type: slow-2g, 2g, 3g, 4g
Geographic Information
- Country
- City (if available)
- Region/State (if available)
- IP address (optionally tracked)
Session Timeline
A chronological list of all events during the session:
- Page views with URLs and timestamps
- User interactions (clicks, form submissions)
- API calls with response times
- Errors with stack traces
- Performance metrics
Performance Metrics for Session
Web Vitals specific to this session:
- Largest Contentful Paint (LCP)
- First Input Delay (FID)
- Cumulative Layout Shift (CLS)
- Time to First Byte (TTFB)
Resources Loaded
List of all resources loaded during the session:
- JavaScript files
- CSS stylesheets
- Images
- Fonts
- API calls
With timing information:
- DNS lookup time
- Connection time
- Request/response time
- Total duration
Filtering Sessions
Use filters to narrow down the session list and find specific sessions:
Available Filters
Time Range
Filter sessions by when they occurred:
- Past 15 minutes
- Past hour
- Past 6 hours
- Past 24 hours
- Past 7 days
- Past 30 days
- Custom date range
User Email
Search for sessions by specific user email address.
Example: user@example.com
Error Count
Filter sessions based on number of errors:
- No errors (= 0)
- With errors (> 0)
- Many errors (> 5, > 10, etc.)
Location Filters
Country: Filter by country
- Example: India, United States, United Kingdom
City: Filter by city (if available)
- Example: Mumbai, New York, London
Browser
Filter by browser type:
- Chrome
- Firefox
- Safari
- Edge
- Opera
- Mobile browsers
Operating System
Filter by OS:
- Windows
- Mac OS X
- Linux
- iOS
- Android
Device Type
Filter by device category:
- Desktop
- Mobile
- Tablet
Session Duration
Filter by how long sessions lasted:
- Short sessions (< 1 minute)
- Medium sessions (1-10 minutes)
- Long sessions (> 10 minutes)
- Custom duration range
Environment
Filter by environment:
- Production
- Staging
- Development
Application Version
Filter by specific version of your application.
Search
Use the search box to find sessions containing specific:
- URLs visited
- Error messages
- User actions
- Custom attributes
Session Analysis Use Cases
Debugging User-Reported Issues
When a user reports a problem:
- Find the session: Search by user email or time range
- Review session details: Check error count and timeline
- Watch session replay: See exactly what the user did
- Identify the issue: Find the error or performance problem
- Reproduce: Try to reproduce based on what you observed
Understanding User Behavior
Analyze sessions to understand how users interact with your app:
- Filter by feature: Find sessions that visited specific pages
- Measure engagement: Look at time spent and actions taken
- Identify patterns: Notice common navigation paths
- Find friction: Look for sessions with many actions but no completion
Quality Assurance
Use sessions to verify new features:
- Filter by version: Select sessions with new version
- Check error rates: Compare error counts to previous version
- Monitor performance: Check Web Vitals for new version
- Watch replays: Verify features work as expected
Performance Analysis by Segment
Understand performance for different user segments:
- Segment by location: Compare performance across countries
- Segment by device: Check mobile vs. desktop performance
- Segment by browser: Identify browser-specific issues
- Segment by network: Analyze slow connection impact
Session Sampling
For high-traffic applications, you may want to sample sessions to manage data volume:
Session Sample Rate
Control what percentage of sessions are tracked:
openobserveRum.init({
// ... other options
sessionSampleRate: 100, // Track 100% of sessions (default)
});Options:
100: Track all sessions (recommended for most apps)50: Track 50% of sessions10: Track 10% of sessions1: Track 1% of sessions
Session Replay Sample Rate
Separately control what percentage of sessions include replay recording:
openobserveRum.init({
// ... other options
sessionSampleRate: 100, // Track all sessions
sessionReplaySampleRate: 20, // But only record 20% of sessions
});This allows you to:
- Track all sessions for metrics and errors
- Record fewer sessions to save storage and bandwidth
- Still capture enough replays for debugging
Conditional Recording
You can also start recording for specific sessions:
// Start recording only when user encounters an error
window.addEventListener('error', () => {
openobserveRum.startSessionReplayRecording({ force: true });
});
// Or when user performs critical action
function onCheckout() {
openobserveRum.startSessionReplayRecording({ force: true });
// ... checkout logic
}Session Metrics and KPIs
Key Performance Indicators
Track these session-based KPIs:
Total Sessions
Total number of sessions in the selected time period.
Trend: Monitor daily/weekly to understand traffic patterns.
Average Session Duration
Mean time users spend in your application.
Benchmark:
- < 1 minute: Poor engagement
- 1-5 minutes: Normal engagement
- 5+ minutes: High engagement
Error Rate
Percentage of sessions that encountered at least one error.
Benchmark:
- < 5%: Excellent
- 5-10%: Good
- 10-20%: Needs attention
-
20%: Critical issues
Pages per Session
Average number of pages viewed per session.
Insights:
- Low (< 2): Users not exploring
- Medium (2-5): Normal browsing
- High (> 5): Highly engaged or lost users
Session Cohort Analysis
Compare sessions across different cohorts:
- By Version: Compare new vs. old versions
- By Time: Compare weekday vs. weekend sessions
- By User Type: Compare new vs. returning users
- By Feature: Compare sessions using different features
Privacy Considerations
User Data
Be mindful of user privacy when tracking sessions:
- Inform users: Add RUM tracking to your privacy policy
- Mask sensitive data: Use appropriate privacy levels
- Allow opt-out: Provide a way for users to opt out
- Secure data: Ensure data is transmitted and stored securely
Compliance
Ensure compliance with regulations:
- GDPR: For European users
- CCPA: For California users
- Other local laws: Based on your user base
Data Retention
Configure data retention policies:
- Decide how long to keep session data
- Automatically delete old sessions
- Provide data export for users who request it
Best Practices
Set User Context Early
Set user information as soon as it's available:
// After user logs in
function onLogin(user) {
openobserveRum.setUser({
id: user.id,
name: user.name,
email: user.email,
});
}
// When user logs out
function onLogout() {
openobserveRum.clearUser();
}Add Custom Session Attributes
Enrich sessions with custom data:
// Add business context
openobserveRum.setGlobalContextProperty('subscription_plan', 'premium');
openobserveRum.setGlobalContextProperty('account_age_days', 45);
// Add feature flags
openobserveRum.setGlobalContextProperty('new_checkout_enabled', true);Monitor Session Quality
Regularly review:
- Sessions with high error counts
- Sessions with unusually short or long duration
- Sessions from new regions or devices
- Sessions after deployments
Troubleshooting
Sessions Not Appearing
If sessions aren't being tracked:
- Verify RUM initialization
- Check browser console for errors
- Verify network requests are reaching OpenObserve
- Check sampling configuration
Missing Session Data
If session data is incomplete:
- Check if user closed browser quickly
- Verify all tracking features are enabled
- Check for ad blockers or privacy extensions
- Verify network connectivity
Duplicate Sessions
If you see duplicate sessions:
- Check if RUM is initialized multiple times
- Verify session management logic
- Check for page reloads or SPAs not handled correctly
Next Steps
- Error Tracking - Learn about error tracking in sessions
- Session Replay - Watch session replays
- Metrics Reference - Complete list of session metrics
Last updated on
Performance Monitoring
RUM performance monitoring tracks Core Web Vitals like LCP, FID, and CLS plus page load, API response times, and slow resources in a real-time dashboard.
Error Tracking
RUM error tracking automatically captures frontend JavaScript, network, and resource errors with stack traces, then links each one to its session replay.