telemetry-db-trace-viewer
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data โ all from the browser, and deployed in milliseconds.
index.ts
https://pixiebrix--3893fb646cd911f093440224a6c84d84.web.val.run
A comprehensive TypeScript-based log viewer application for analyzing CSV log data with advanced filtering, sorting, and export capabilities.
- ๐ File Upload: Drag-and-drop or click to upload CSV files (up to 50MB)
- ๐ง Email Filter: Filter logs by email address with autocomplete suggestions
- ๐ Trace ID Filter: Filter logs by data.traceId with autocomplete suggestions
- โก Real-time Search: Instant filtering as you type
- ๐ Data Export: Export filtered results to CSV format
- ๐ Sorting: Click column headers to sort by any field
- ๐ Pagination: Handle large datasets with configurable page sizes (25/50/100/200)
- ๐ Row Expansion: Click to expand rows and view detailed JSON data
- ๐ Copy to Clipboard: Copy individual trace IDs or full records
- โจ๏ธ Keyboard Shortcuts: Efficient navigation with hotkeys
- ๐ฑ Responsive Design: Works seamlessly on desktop and mobile
- โ ๏ธ Error Handling: Comprehensive error reporting and data validation
- ๐ง Smart CSV Parsing: Handles both tab-separated and comma-separated values
- ๐ก๏ธ Data Validation: Validates required columns and data integrity
- ๐ JSON Parsing: Automatically parses JSON data fields with fallback handling
- ๐ Analytics: Track parsing warnings and data quality issues
โโโ backend/
โ โโโ index.ts # Hono-based HTTP server with file upload handling
โโโ frontend/
โ โโโ components/
โ โ โโโ App.tsx # Main application component with state management
โ โ โโโ FileUpload.tsx # Drag-and-drop file upload widget
โ โ โโโ FilterControls.tsx # Advanced filtering with autocomplete
โ โ โโโ LogTable.tsx # Sortable, paginated data table
โ โ โโโ KeyboardShortcuts.tsx # Keyboard navigation support
โ โโโ index.html # Main HTML template with TailwindCSS
โ โโโ index.tsx # React application entry point
โ โโโ style.css # Enhanced custom styles and animations
โโโ shared/
โ โโโ types.ts # Comprehensive TypeScript type definitions
โโโ sample_data.csv # Example CSV file for testing
โโโ README.md
- Upload Data: Use the file upload widget to select your CSV file
- Apply Filters: Use email and trace ID filters to narrow down results
- Explore Data: Click on rows to expand and view detailed information
- Export Results: Export filtered data for further analysis
- Ctrl + U: Upload new file
- Ctrl + K: Clear all data
- Ctrl + E: Export filtered data
- ?: Show/hide keyboard shortcuts help
- Esc: Close help modal
The application expects CSV data with these required columns:
store_record.id- Unique record identifierkey- Record key/identifierdata- JSON string containing log dataemail- User email address
Optional columns (will be displayed if present):
created_at- Record creation timestampupdated_at- Record update timestampdatabase_id- Database identifierorganization_id- Organization identifieruser_id- User identifierapi_appuser.id- API app user identifier
The data field should contain JSON with these common fields:
{ "mod": { "id": "@foundever/everassist/wrap-up", "version": "4.8.6" }, "url": "https://example.com", "data": { "from": "fab", "traceId": "ec18475f-9549-481c-a1c4-497801153f57" }, "email": "user@example.com", "event": "callSummaryStart:click", "timestamp": "2025-07-29T14:11:36.391Z", "platformType": "contentScript" }
- File Processing: Handles large CSV files with streaming
- Error Handling: Comprehensive validation and error reporting
- CORS Support: Automatic cross-origin request handling
- Health Monitoring: Built-in health check endpoint
- State Management: Efficient React hooks for data and UI state
- Performance: Optimized rendering with useMemo and pagination
- Accessibility: Keyboard navigation and screen reader support
- Responsive: Mobile-first design with TailwindCSS
- Upload Validation: File type, size, and format checks
- CSV Parsing: Smart detection of separators (tab/comma)
- Data Validation: Required column verification
- JSON Processing: Safe parsing with error recovery
- Filtering: Real-time client-side filtering
- Export: Clean CSV generation with proper escaping
The application provides detailed error reporting for:
- File Format Issues: Invalid CSV structure or encoding
- Missing Columns: Required fields not found
- JSON Parsing Errors: Malformed data fields
- Size Limitations: Files exceeding 50MB limit
- Network Issues: Upload and processing failures
- Large File Support: Handles files up to 50MB
- Efficient Filtering: Client-side filtering with debouncing
- Pagination: Renders only visible rows for better performance
- Memory Management: Optimized data structures and cleanup
- File Validation: Strict CSV file type checking
- Size Limits: Prevents oversized file uploads
- Data Sanitization: Safe JSON parsing and HTML escaping
- No Persistence: Data is processed in-memory only
- Drag & Drop: Intuitive file upload experience
- Loading States: Clear feedback during processing
- Error Messages: User-friendly error descriptions
- Autocomplete: Smart suggestions for filters
- Copy Actions: One-click copying of data
- Responsive Tables: Horizontal scrolling on mobile
- Dark Mode: Automatic system preference detection