Discover: Ad-Hoc Query Builder for All Your Data
Query events, errors, spans, and logs with a visual query builder. Build custom reports, save them for your team, and explore your data without writing SQL.
Why Dashboards Aren't Enough
Dashboards are great for monitoring known metrics. They show you the numbers you've already decided to watch. But the most important questions in engineering and product are the ones you didn't anticipate.
"Why did signups drop 30% last Tuesday?" "Which API endpoints have the highest error rate for users in Germany?" "What's the average response time for database queries that touch the orders table?"
These questions cut across data types -- events, errors, spans, logs -- and require flexible filtering, aggregation, and grouping that static dashboards can't provide.
Today we're launching Discover, a visual query builder that lets you explore all your JustAnalytics data interactively. Think of it as SQL for your observability data, but without writing SQL.
The Query Builder
Discover provides a drag-and-drop interface for building queries across all data types in JustAnalytics.
Data Sources
Every query starts by selecting a data source:
| Data Source | What It Contains |
|---|---|
| Events | Pageviews, clicks, custom events, e-commerce events |
| Errors | JavaScript errors, server-side exceptions |
| Spans | Distributed trace spans (HTTP, database, custom) |
| Logs | Structured log entries from the Node.js SDK |
| Sessions | Session-level aggregations |
| Web Vitals | Core Web Vitals measurements |
Building a Query
A Discover query has four parts:
1. Columns (what to show)
Select the fields you want to see. Each data source has its own set of available fields:
Events: url, referrer, country, device, browser, os, timestamp
Errors: message, stack_trace, url, browser, error_type, count
Spans: service, operation, duration, status, http_method, db_system
Logs: level, message, service, trace_id, timestamp
Sessions: duration, page_count, bounce, country, device
Web Vitals: lcp, fid, cls, inp, ttfb, url
2. Aggregations (how to summarize)
Apply aggregation functions to numeric fields:
| Function | Description | Example |
|---|---|---|
| count() | Number of records | Count of errors per page |
| count_unique() | Distinct values | Unique users per country |
| sum() | Total | Total revenue by source |
| avg() | Average | Average span duration by service |
| p50() | Median | Median page load time |
| p75() | 75th percentile | p75 response time |
| p95() | 95th percentile | p95 database query time |
| p99() | 99th percentile | p99 API latency |
| min() | Minimum | Fastest response time |
| max() | Maximum | Slowest response time |
3. Filters (which records to include)
Filter by any field using comparison operators:
WHERE country = "US"
AND device = "mobile"
AND timestamp >= "2026-03-01"
AND url CONTAINS "/checkout"
AND NOT browser = "bot"
Filters support:
- Equality:
=,!= - Comparison:
>,>=,<,<= - String matching:
CONTAINS,STARTS_WITH,ENDS_WITH - Set membership:
IN,NOT IN - Null checks:
IS NULL,IS NOT NULL - Regex:
MATCHES(regular expression)
4. Group By (how to segment)
Group results by one or more fields:
GROUP BY country, device
Example Queries
Top error messages by count:
Source: Errors
Columns: message, count()
Group By: message
Sort: count() DESC
Limit: 20
Average API latency by endpoint and status:
Source: Spans
Columns: operation, http_status_code, avg(duration), p95(duration), count()
Filter: service = "api-gateway"
Group By: operation, http_status_code
Sort: avg(duration) DESC
Revenue by country and device:
Source: Events
Columns: country, device, sum(value), count_unique(transaction_id)
Filter: event_name = "purchase"
Group By: country, device
Sort: sum(value) DESC
Slowest database queries:
Source: Spans
Columns: db_statement, avg(duration), p99(duration), count()
Filter: db_system = "postgresql" AND duration > 100
Group By: db_statement
Sort: p99(duration) DESC
Limit: 50
Visual Query Building
While the examples above show queries in a text format for clarity, the actual Discover interface is entirely visual.
Drag-and-Drop Columns
Available fields appear in a sidebar organized by category. Drag a field to the columns area to add it to your query. Drag an aggregation function onto a numeric field to apply it.
Filter Builder
Click Add Filter to open the filter builder. Select a field, choose an operator, and enter a value. The filter builder shows a preview of matching values as you type, so you can verify your filter before running the query.
Interactive Results
Query results appear as a sortable, paginated table. Click any column header to sort. Click any row to drill down into the underlying records.
Visualization Toggle
Switch between table view and chart view with a single click:
- Table -- raw results with sorting and pagination
- Bar chart -- for categorical comparisons
- Line chart -- for time series data
- Pie chart -- for proportional breakdowns
- Area chart -- for stacked time series
- Heatmap -- for two-dimensional distributions
The visualization type is auto-suggested based on your query structure, but you can override it.
Cross-Data-Type Queries
One of Discover's most powerful features is the ability to query across data types. Because JustAnalytics stores events, errors, spans, and logs in the same platform with shared identifiers (session IDs, trace IDs), you can correlate across boundaries.
Joining Events to Errors
"Show me pageviews where an error occurred during the same session:"
Source: Events
Join: Errors ON session_id
Columns: url, count() as pageviews, count(errors.id) as error_count
Group By: url
Sort: error_count DESC
Joining Spans to Logs
"Show me API endpoints where error logs were emitted:"
Source: Spans
Join: Logs ON trace_id
Columns: operation, avg(duration), count(logs.id) as log_count
Filter: logs.level = "error"
Group By: operation
Sort: log_count DESC
Joining Sessions to Web Vitals
"Show me sessions with poor Core Web Vitals by country:"
Source: Sessions
Join: Web Vitals ON session_id
Columns: country, count() as sessions, avg(web_vitals.lcp) as avg_lcp
Filter: web_vitals.lcp > 2500
Group By: country
Sort: sessions DESC
Saving and Sharing Queries
Saved Queries
Click Save to store a query for later use. Saved queries appear in your Discover sidebar and can be organized into folders:
My Queries/
├── Daily Checks/
│ ├── Top errors today
│ ├── Slowest endpoints
│ └── Revenue by source
├── Investigation/
│ ├── Checkout drop-off analysis
│ └── Mobile crash patterns
└── Reports/
├── Weekly error summary
└── Monthly revenue breakdown
Sharing Queries
Every saved query has a shareable URL. Send it to a teammate and they'll see the same query with the same filters, updated with the latest data. Shared queries respect your team's site-level permissions.
Query Permalinks
For one-off queries you haven't saved, Discover encodes the full query in the URL. Copy the URL and paste it into a Slack message or Jira ticket. Anyone with dashboard access can open it and see the results.
Standard Reports Library
Discover includes a library of pre-built reports that cover common analysis patterns. These are ready to use out of the box and serve as starting points for custom queries.
Error Analysis Reports
| Report | Description |
|---|---|
| Top Errors | Most frequent error messages, sorted by count |
| Error Rate by URL | Which pages produce the most errors |
| Errors by Browser | Browser-specific error patterns |
| New Errors (24h) | Errors seen for the first time today |
| Regression Errors | Previously resolved errors that reappeared |
Performance Reports
| Report | Description |
|---|---|
| Slowest Endpoints | API endpoints ranked by p95 latency |
| Database Query Performance | Slowest SQL queries with execution counts |
| Web Vitals by Page | Core Web Vitals broken down by URL |
| Throughput by Service | Requests per second by service |
| Error Rate by Service | HTTP 5xx rate by service |
User Behavior Reports
| Report | Description |
|---|---|
| Top Pages | Most visited pages with engagement metrics |
| Traffic Sources | Referrer breakdown with conversion rates |
| Geographic Distribution | Sessions and pageviews by country |
| Device Breakdown | Desktop vs mobile vs tablet usage |
| Bounce Rate Analysis | Bounce rate by landing page and source |
E-commerce Reports
| Report | Description |
|---|---|
| Revenue Summary | Total revenue, transactions, AOV by period |
| Product Performance | Revenue and conversion rate by product |
| Funnel Conversion | Stage-by-stage conversion rates |
| Cart Abandonment | Sessions that added to cart but didn't purchase |
| Revenue by Channel | Attribution-weighted revenue by traffic source |
Custom Reports
Click Duplicate on any standard report to create your own version. Modify the columns, filters, and grouping to match your specific needs, then save it to your library.
Query Performance
Discover queries run against optimized column-oriented indexes in JustAnalytics. Performance depends on the time range and data volume:
| Time Range | Typical Response Time |
|---|---|
| Last 1 hour | < 500ms |
| Last 24 hours | < 2 seconds |
| Last 7 days | < 5 seconds |
| Last 30 days | < 10 seconds |
For queries over large time ranges, JustAnalytics uses pre-aggregated data when possible. Aggregation functions like count() and sum() over daily data use the aggregation tables, making even 30-day queries fast.
Query Limits
To prevent runaway queries, Discover enforces limits:
- Maximum result rows: 10,000
- Maximum query time: 30 seconds
- Maximum concurrent queries: 5 per user
If a query exceeds the time limit, you'll receive a suggestion to narrow the time range or add more specific filters.
API Access
Every Discover query can be executed programmatically via the API:
curl -X POST https://api.justanalytics.app/v1/discover/query \
-H "Authorization: Bearer ja_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"source": "spans",
"columns": ["operation", "avg(duration)", "p95(duration)", "count()"],
"filters": [
{"field": "service", "op": "=", "value": "api-gateway"}
],
"groupBy": ["operation"],
"orderBy": {"field": "avg(duration)", "direction": "desc"},
"limit": 20,
"timeRange": {"start": "2026-03-01", "end": "2026-03-31"}
}'
This enables:
- Scheduled reports via cron jobs
- Custom dashboards in external tools
- Automated analysis in CI/CD pipelines
- Data export to data warehouses
Getting Started with Discover
- Navigate to Dashboard > Discover in your JustAnalytics dashboard
- Select a data source from the dropdown
- Add columns by clicking field names or dragging them
- Add filters to narrow your results
- Click Run Query
- Switch between table and chart views
- Save the query if you want to use it again
Start with the standard reports library if you're not sure what to query. Each report includes a description of what it shows and why it's useful.
Start your 7-day free trial and explore your data like never before.
The engineering and product team behind JustAnalytics. We're on a mission to make web observability simpler, faster, and more private.