Repository navigation
Add grouped error issues and frequency analytics - #30
Conversation
There was a problem hiding this comment.
Reviewed commit 91304d506b0b97d285100ae0be87b0600f784e03 with two GPT-6.1-Sol reviewers and an independent Claude Opus 5.5 review. One actionable finding, verified against the ingestion code, is below.
Validation: 27 focused analytics unit tests, 12 Errors/operations browser tests, and TypeScript checking passed. Browser tests used this PR's isolated checkout and a separate server port. The nine opt-in live-server tests were skipped because no reference server was configured; Storybook was not rerun.
| export const ERROR_EXPLORE_LIMIT = { default: 100, max: 10_000 } as const; | ||
|
|
||
| const ALIASES = { | ||
| severityText: ['p_log_category', 'level', 'log_level', 'severity', 'severity_text'], |
There was a problem hiding this comment.
[P2] Exclude body-inferred categories from severity-based error classification. p_log_category is not always an explicit severity: when an OTLP record has severity_number: 0, flatten_log_record falls back to a case-insensitive substring search of its body (src/otel/logs.rs:163–173). For example, a body of "0 errors found" produces p_log_category: "ERROR" while its actual severity remains unspecified. Including that category here makes severityPredicate accept the record, inflating the summary, frequency chart and issue counts and including it in SQL investigation results. This also contradicts the documented guarantee that message text is not used to classify errors.
For OTLP logs, use the explicit severity fields, or gate this derived category so the body-search fallback cannot qualify a record. Add a regression fixture with severityNumber: 0 and a non-error body containing "error"; the current live OTLP fixtures exercise specified severities only. This finding is verified from the producer and generated predicate, not a live-server reproduction.
Description
The Errors page previously offered only individual OTLP error spans. It now groups trace and log errors into issues by exact service, error type and message, with full-range counts, frequency charts, sortable pagination and occurrence inspection. The existing error-span view and trace links remain available; log issues open matching stored records in the SQL editor.
Analytics uses the existing SQL API with precise time predicates and safely quoted keys. Trace event expansion and exporter retries count each span once, and exception type/message pairs come from one representative row. Log classification supports textual severity aliases, OTLP numeric severity and Pino/Bunyan levels. Permission failures and unsupported schemas remain distinct. Sample mode supports the same investigation flow.
Validation:
Readable regression tests and the counting/test runbook are included in
frontend/docs/error-analytics.md; dated evidence is infrontend/docs/validation-review.mdand the Mayfly implementation record.Grouping is exact; persisted assignment/resolution, fuzzy grouping and cross-dataset correlation remain outside scope. Large-production-dataset query performance and cross-browser behavior have not been established. The full unrelated browser/screenshot suites were not rerun.
This PR has:
Need help on this PR? Tag
@codesmith-botwith what you need.