Real-Time Geographic Tracking
Watch your API requests in real-time on an interactive world map with animated arcs showing traffic flow from source to destination.Overview
The Real-Time Geo feature provides live visualization of API requests:- 🌍 Interactive World Map - Leaflet-powered map with smooth animations
- ✈️ Animated Request Arcs - Visual paths from client to backend
- 🎵 Audio Feedback - Ping sound on each request (optional)
- 📍 City-Level Precision - See exact cities for requests
- 🎨 Color-Coded Status - Green (success), Red (error), Yellow (redirect)
- 📊 Live Statistics - Requests/minute, active routes
- Live demos and presentations
- Monitoring global traffic patterns
- Detecting geographic issues
- Understanding user distribution
What You’ll See
Animated Request Arcs
Each API request draws an arc on the map: Arc properties:- Start point: Client IP location (latitude, longitude)
- End point: Backend API location
- Color:
- 🟢 Green: Success (2xx status codes)
- 🔴 Red: Error (4xx, 5xx status codes)
- 🟡 Yellow: Redirect (3xx status codes)
- Animation: Arc draws from source to destination over 2 seconds
- Label: Shows method, path, latency
Request Details Panel
On the right side, see live request feed: Each entry shows:- 🌐 Source: City, Country
- 🎯 Destination: City, Country
- 📝 Request: HTTP method and path
- ✅ Status: Status code with color indicator
- ⏱️ Latency: Response time in milliseconds
- 🕐 Time: Timestamp of request
Live Statistics
Top bar displays:- Total Requests: Cumulative count since page load
- Requests/Minute: Current rate (rolling average)
- Active Routes: Number of routes receiving traffic
Using Real-Time Geo
Step 1: Navigate to Page
- Click Monitoring in sidebar
- Select Real-Time Geo
- Map initializes and starts listening for requests
Step 2: Enable Audio (Optional)
Toggle audio feedback:- Click Audio toggle in top-right
- Each request plays a ping sound
- Useful for background monitoring
- Frequency: 800Hz sine wave
- Duration: 200ms
- Volume: 30% (not too loud)
Step 3: Watch Live Traffic
As requests come in:- Marker appears at source location
- Arc animates from source to destination
- Request details appear in right panel
- Statistics update
- Audio ping plays (if enabled)
Step 4: Interact with Map
Map controls:- Zoom: Mouse wheel or +/- buttons
- Pan: Click and drag
- Reset View: Click home button
- Scroll: View historical requests (last 50)
- Auto-scroll: List scrolls to show newest requests
Features
SSE (Server-Sent Events) Connection
Real-time streaming:- Persistent connection to server
- Pushes new requests as they occur
- Connection indicator shows status
- 🟢 Connected: Receiving live data
- 🔴 Disconnected: Connection lost, retrying
- 🟡 Connecting: Establishing connection
- Automatic reconnection every 5 seconds
- No data loss (buffered on server)
Geographic Resolution
How locations determined:- Client IP → GeoIP lookup → City, Country, Coordinates
- Backend URL → DNS resolution → IP → GeoIP lookup
- Cached for performance
- City-level for most requests
- Country-level if city unknown
- Coordinates used for precise arc drawing
Color Coding
Status code colors:- All green = everything working
- Red arcs appearing = errors, investigate
- Many yellow = redirects (might be configuration issue)
Request Persistence
On-screen:- Arcs fade after 5 seconds
- Request list keeps last 50 requests
- Statistics accumulate since page load
Use Cases
Use Case 1: Live Demo
Scenario: Presenting KnoxCall to stakeholders Setup:- Open Real-Time Geo on large monitor
- Enable audio feedback
- Generate some test traffic
- Show animated arcs in real-time
Use Case 2: Geographic Load Balancing
Scenario: Verify multi-region setup What to look for:- Possible routing misconfiguration
- Clients not hitting nearest backend
- Investigate environment overrides
Use Case 3: Incident Response
Scenario: Users in specific region reporting errors Investigation:- Open Real-Time Geo
- Watch for red arcs from that region
- Check destination backend
- Verify latency values
Use Case 4: Traffic Pattern Analysis
Scenario: Understanding global user distribution Observe over 1 hour:- Which regions generate most traffic?
- What times are peak for each region?
- Are there unexpected traffic sources?
Advanced Features
Filter by Route
Coming soon: Filter to show only specific routes Use case: Monitor traffic for single route during deploymentLatency Heatmap Overlay
Map overlay shows:- Color intensity = average latency
- Identify slow regions
- Plan infrastructure improvements
- Toggle Heatmap view
- See color gradient (green = fast, red = slow)
Historical Playback
Coming soon: Replay past traffic Use case: Analyze incidents after they occurredBest Practices
1. Use for Live Monitoring
Ideal scenarios:- Load testing (watch traffic scale)
- Deployments (ensure no errors)
- Marketing campaigns (see traffic spikes)
- Conference demos (impressive visualization)
2. Enable Audio During Background Monitoring
When working on other tasks:- Open Real-Time Geo on second monitor
- Enable audio
- Mute if no activity (silence = good)
- Investigate when rapid pings (unusual activity)
3. Combine with Analytics Dashboard
Split screen setup:- Left: Real-Time Geo (live visualization)
- Right: Analytics (charts and metrics)
4. Use for Client Onboarding
Show new clients:- Their first test request
- Arc animating across map
- Successful green arc = integration working
5. Screenshot for Reports
Monthly reports:- Open Real-Time Geo during peak traffic
- Screenshot showing global traffic
- Include in monthly/quarterly reports
- Visual representation of reach
Troubleshooting
Issue: “No requests appearing”
Causes:- No active traffic to routes
- SSE connection disconnected
- Browser blocking SSE (firewall/proxy)
- Check connection indicator (should be green)
- Generate test request:
- Verify request appears on map
Issue: “Map not loading”
Causes:- Leaflet CSS not loaded
- JavaScript error
- Feature not available on subscription plan
- Refresh page
- Check browser console for errors
- Verify subscription includes Real-Time Geo
Issue: “Locations incorrect”
Causes:- GeoIP database outdated
- VPN/proxy hiding real location
- IP address not in GeoIP database
- VPN users show VPN exit location (not real location)
- This is correct behavior
Issue: “Audio not working”
Causes:- Browser autoplay policy (requires user interaction)
- Audio muted in browser
- Audio toggle disabled
- Click anywhere on page (activates audio context)
- Enable audio toggle
- Check browser audio settings
Technical Details
SSE Endpoint
Connection:Performance
Optimization:- Arcs removed after 5 seconds (prevent memory leak)
- Request list limited to 50 entries
- Coordinates cached (avoid repeated GeoIP lookups)
- Modern browser with SSE support
- Canvas/SVG support for animations
- Audio API support (optional, for audio feedback)
Privacy Considerations
Data shown:- Client city and country (not exact address)
- Backend city and country
- Request paths (may contain sensitive data)
- Don’t share screenshots if paths contain secrets
- Use for internal monitoring only
- Consider data privacy regulations (GDPR, etc.)
Related Features
- Analytics: View aggregate traffic metrics
- API Logs: Detailed request history
- Alerts: Set up geographic alerts (coming soon)
Next Steps
Analytics
View aggregate metrics
API Logs
Detailed request logs
Alerts
Configure monitoring alerts
Routes
Configure routes to track
Statistics: Level: beginner | Time: 5 minutes | Tags:
real-time, geographic, visualization, monitoring, live