A browser extension for inspecting and debugging AbsurderSQL telemetry data directly in Chrome/Firefox DevTools.
- Real-time Span Visualization - View all recorded spans with filtering and search
- Export Statistics Dashboard - Track export success/failure rates
- Configuration UI - Configure OTLP endpoint, batch size, and headers
- Buffer Inspection - View and manage the span buffer
- Manual Flush - Trigger span export on demand
- Error Tracking - Monitor export errors and debugging info
- Open
chrome://extensions/ - Enable "Developer mode" (top right)
- Click "Load unpacked"
- Select the
browser-extensiondirectory - Open DevTools (F12) and find the "AbsurderSQL" tab
- Open
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Select
manifest.jsonfrom thebrowser-extensiondirectory - Open DevTools (F12) and find the "AbsurderSQL" tab
- AbsurderSQL with
--features telemetryenabled - WasmSpanExporter with DevTools integration enabled:
use absurder_sql::telemetry::WasmSpanExporter;
let exporter = WasmSpanExporter::new("http://localhost:4318/v1/traces".to_string())
.with_devtools(true) // Enable DevTools integration
.with_batch_size(100);- Open DevTools (F12)
- Navigate to the "AbsurderSQL" tab
- Click on the "Spans" tab
- Use the search bar to filter spans by name
- Use the status dropdown to filter by OK/Error
- Navigate to the "Export Stats" tab
- View real-time export metrics:
- Total exports
- Successful exports
- Failed exports
- Success rate percentage
- Check the "Recent Errors" section for troubleshooting
- Navigate to the "Configuration" tab
- Configure:
- OTLP Endpoint - Where to send spans
- Batch Size - Number of spans per batch
- Auto-Export - Enable/disable automatic export
- DevTools Integration - Toggle DevTools messages
- Custom Headers - Add authentication headers (JSON format)
- Click "Save Configuration"
Example custom headers:
{
"Authorization": "Bearer YOUR_API_KEY",
"X-Custom-Header": "value"
}- Navigate to the "Buffer" tab
- View buffer statistics:
- Buffered span count
- Buffer size in bytes
- Batch threshold
- Click "Inspect Buffer" to view raw buffer contents
- Click "Clear Buffer" to remove all buffered spans
Click the "⚡ Flush" button in the header to manually trigger span export at any time.
The extension uses a three-tier architecture for Manifest V3 compatibility:
Page → Content Script → DevTools Hub → Panel
Pages send telemetry using window.postMessage:
window.postMessage({
source: 'absurdersql-telemetry',
message: {
type: 'span_recorded',
data: {
span_id: '...',
name: 'query_execution',
start_time_ms: 1234567890,
end_time_ms: 1234567900,
status: { code: 'Ok' },
attributes: {}
}
}
}, '*');- Page sends telemetry via
window.postMessagewithsource: 'absurdersql-telemetry' - Content Script (
content.js) listens for window messages and forwards to DevTools hub via port - DevTools Hub (
devtools.js) connects content script to panel and forwards messages - Panel (
panel.js) receives telemetry and updates UI
This architecture works around Manifest V3 service worker limitations by making the devtools page (which stays alive while DevTools is open) the message hub instead of a background worker.
span_recorded- New span was recordedexport_stats- Export statistics updateexport_error- Export failedbuffer_update- Buffer status changedconfig_update- Configuration changed (from DevTools to page)flush_spans- Manual flush requestedget_buffer- Request buffer contentsclear_buffer- Clear the buffer
browser-extension/
├── manifest.json # Extension manifest (Manifest V3)
├── devtools.html # DevTools entry point
├── devtools.js # Message hub between panel and content script
├── panel.html # Main panel UI
├── panel.css # Panel styling
├── panel.js # Panel logic and telemetry display
├── content.js # Content script to bridge page and extension
├── icons/ # Extension icons
│ ├── icon-16.png
│ ├── icon-48.png
│ └── icon-128.png
├── README.md # This file
└── INSTALLATION.md # Installation guide
Icons should be PNG files with transparent backgrounds:
icon-16.png- 16x16px (toolbar)icon-48.png- 48x48px (extension management)icon-128.png- 128x128px (Chrome Web Store)
You can create these from SVG using tools like ImageMagick:
convert icon.svg -resize 16x16 icon-16.png
convert icon.svg -resize 48x48 icon-48.png
convert icon.svg -resize 128x128 icon-128.png- Make changes to extension files
- Go to
chrome://extensions/ - Click the refresh icon on the AbsurderSQL extension
- Reload DevTools to see changes
- Ensure the extension is enabled in
chrome://extensions/ - Check that you've opened DevTools after enabling the extension
- Try closing and reopening DevTools
- Verify AbsurderSQL is built with
--features telemetry - Ensure
with_devtools(true)is called on WasmSpanExporter - Check browser console for errors
- Verify DevTools integration is enabled in Configuration tab
- Check the "Recent Errors" section in Export Stats tab
- Verify OTLP endpoint is correct and accessible
- Check custom headers for authentication issues
- Ensure CORS is configured on the OTLP endpoint
- Custom Headers: Be cautious with sensitive authentication tokens
- Host Permissions: Extension requires
<all_urls>to communicate with any OTLP endpoint - Local Storage: Configuration is stored in browser's local storage
This extension is part of the AbsurderSQL project and uses the same license.
For issues, questions, or contributions, visit: https://github.com/npiesco/absurder-sql