Repository navigation
Traces gets an AI tab: find and fix slow, failing and under-traced operations with pull requests - #5234
Merged
Conversation
…operations and fix them with pull requests (server) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd Fix with AI on its findings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…iteria Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…latency deferral, triage framing Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 29 new strings of Traces' AI tab, its switch, its rules and Fix with AI, translated into the 16 other Dashboard languages with the Profiler lane's terms. The AI rules description that named only Profile is gone from every file: its Trace-aware successor replaces it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e explorer link and the breadcrumbs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l 17 languages The Traces Explorer page gets the AI tab in its tab table, a card, and a section on what OneUptime files from a service's traces every hour (slow operations, failing operations, missing tracing, each with its gates), the verdict a failing operation's pull request waits for, the switch, the AI rules and where to see what OneUptime AI did. TracesAiDocsFacts holds the section to TraceInsight, the lane, the switch, the side menu, the rules' answers and the explorer link. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TracesAi bundles Traces' real layout and AI pages over a fixture that answers their reads as the server does, and checks, at 1280 and 390, light and dark: the AI tab and side menu, Settings (switch, readiness, rules and a new rule's words), Insights, a finding's Fix with AI in every state and Open in Traces, and Logs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-traces The Traces AI switch migration is renumbered to 1807110000000, after master's AddAiContext1807100000000. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eenshots and traces Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fix suggestion AI rules now trigger on Incident, Alert, Profile and Trace, and Common/Utils/Suggestions holds TelemetryAiFixSuggestion, Fix with AI's offer on a telemetry lane's finding. The routing test passes a verdict's classification as the string it is, for the strict test compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-traces Master's AddAuditLogExport took 1807110000000, so the Traces AI switch migration is renumbered to 1807120000000. The locale files' conflict (both sides appended keys) is merged by npm run i18n:extract. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
… the evidence as written, Fix with AI in the rail - Create Monitor on a trace finding was greyed out with "cannot be created from this kind of insight yet" on all three kinds. A failing operation now opens a Traces monitor on its failed spans (its span name, the Error status, its service, the past hour) at the detector's own floor of 20 failed spans; a slow operation keeps the button, disabled, with a reason of its own (no monitor watches how long an operation takes yet); missing tracing draws no button at all - a monitor could never count what a trace lacks. The operation's name reaches only the span filter, never the monitor's words. - Monitor Create from any AI insight, link or template drew "props.initialValue.toJSON is not a function" and no status to pick: the archived-values read called toJSON() on steps that arrive as JSON. It reads them as text now, whatever their shape (MonitorSteps.tsx). - The evidence a finding shows is the detector's own, built by a pure buildTraceInsightDetail the offline fixture now draws too (it showed made-up prose). Fixed in it: a service's look wrote "p50 0 ms", list items opened in lower case, "Request read" said nothing, code locations sat inside the repeated-pattern list, and "In 5 of the 5 most recent failures" reads "In each of the 5". - Fix with AI in a finding page's narrow rail: the repository picker and the button sat side by side and squeezed the button into "Fix / with / AI". Both strips (Traces' and the Profiler's) stack by a container query now, side by side only where the strip is wide enough. - The Traces lane's summary lines promised a pull request for every problem; a failing operation's waits for the code to be found at fault, and a fix may find nothing to change: "for each one it can fix". - 14 strings in all 16 languages; 4 replaced keys dropped everywhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st for each problem it can fix - in 17 languages; tests for the review - Traces Explorer: "On a failing operation, **Create Monitor** sets up a Traces monitor on its failed spans." and the AI rules line says a pull request opens "for each one it can fix", in all 17 languages, with the Dashboard's own label for Create Monitor in each. TracesAiDocsFacts pins both to the lane's copy and to the monitor prefill. - The real Monitor Create page opens on the Traces monitor from a failing operation and says the slow operation's reason instead of a form (MonitorCreateFromAIInsight). - The strip layout is keyed to its container, never the window, the button never wraps, and both strips use it (TelemetryAiFixCopy); no summary line promises a pull request for each problem (TelemetryAiCopy). - Offline browser specs: the evidence as the detector writes it, Create Monitor on each kind of finding, the picker stacked in the rail and side by side at 1024; the fixture's notes and README say what it draws. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six more tests (the evidence as the detector writes it, Create Monitor on each kind of finding, the picker in the narrow rail): 1.5 minutes with its bundle locally, from 1.3 - about 21.3 for the group's ten suites. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-traces Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
||
| router.post( | ||
| TELEMETRY_AI_FIX_SUGGESTION_PATH, | ||
| UserMiddleware.getUserMiddleware, |
|
|
||
| router.post( | ||
| TELEMETRY_AI_FIX_PATH, | ||
| UserMiddleware.getUserMiddleware, |
…-traces Locale files merged by key: master's new keys and this branch's, no key changed on both sides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Group 8 took 22.4 minutes on master's last green App Test run without it, and group 1 14.9: with Traces AI's 1.5 minutes group 8 would have passed the 22-minute mark the groups are kept under. About 16.5 for group 1 now. Its screenshots and traces upload as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 24, 2026
Merged
simlarsen
added a commit
that referenced
this pull request
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Traces gets the AI section the Profiler got in #5228: an AI tab between Insights and Setup Guide, with Insights, Logs and Settings under a side menu of its own. Every hour OneUptime reads each service's last hour of spans and files three kinds of AI insight; OneUptime AI then looks into each and opens a pull request in the repository that holds the code. Nothing is ever merged.
How it decides
Common/Types/AI/TelemetryAi):TelemetryAiLane.Trace, switchProject.enableAutomaticTraceRemediation(on for new projects, off for existing ones by migration1807120000000-AddTraceAiSwitch), trigger entityTracefor AI rules (Match / Investigate / Fix, matched by service).TraceProblemDetector, pure gates inCommon/Utils/Traces/TraceInsight): a projection-served first stage (TraceAggregationService.getServiceSpanHealthonproj_hist_by_minute, p99 fromproj_agg_by_service), then at most 3 services of each kind and 2 operations each, read closely. One shared look per scan, three detectors.fixAfterVerdictInsightTypes): a failing operation's automatic pull request opens only once the triage classifies itcode-fault; a failure from a dependency, the network or bad input gets none unless a person asks.TelemetryAiFixStrip,POST /telemetry-ai/fix-suggestionand/telemetry-ai/fix): the person's own pull request, with a repository picker when the code was not found in one, and every blocker said in place.Words and docs
TracesAiDocsFactspins its numbers toTraceInsight.Tests
test-traces-ai-ui(new, App Test group 1 since the UI review): 40 tests at 1280 and 390, light and dark, about 1.5 minutes with its bundle.Follow-ups (not in this PR)
UI review
Looked at, for real: Traces → AI → Insights (list, empty, empty while the switch is off, Enable AI off), a finding's page for each kind (slow, failing with its fix task, missing tracing) and every Fix with AI state (offered, a repository to pick, connect a repository, no AI credits, already running, refused, started), Logs (list, Load More, empty, failed), Settings (switch on and off, Enable AI off, no repository, no credits, More settings with the AI rules table, the create rule dialog step by step and the edit dialog), Monitor Create opened from a finding, and the Profiler's finding page beside it. At 1280 and 390 (and 768, 1024 and 1600 for the finding page), light and dark, in English, German, Persian (right to left), Japanese and Russian - the production pages in the offline fixture, with Inter; Monitor Create in the MonitorOverview fixture with a finding answered.
What changed, and why
isAIInsightMonitorOffered).toJSON()on steps that arrive as plain JSON. It reads them as text now, whatever their shape (Components/Form/Monitor/MonitorSteps.tsx, one line). Found by rendering the new Traces monitor; the error-log spike prefill showed the same.buildTraceInsightDetail(Common/Utils/Traces/TraceInsight) that the detector writes with and the fixture draws with. What reading it found: a service's look wrote "p50 0 ms" (it reads only the p99), list items opened in lower case ("- the same database query ran..."), "Request read: trace ..." said nothing a person could act on (now "Slowest request" or "A failed request"), the code locations sat inside the repeated-pattern list, and "In 5 of the 5 most recent failures" reads "In each of the 5 most recent failures".FIX_STRIP_*inTelemetryAiFixCopy): stacked in the rail and on a phone, side by side where the strip is wide (1024), the button's words always on one line.TracesAiDocsFactspins both to the code.New words: 10 new strings (the Traces monitor and its two refusals) and 4 rewritten ones, translated in all 16 languages; the 4 replaced keys are gone from all 17 files.
i18n:checkandi18n:validateare clean.Tests added or changed
Common/Tests/Utils/Traces/TraceInsight.test.ts: the evidence per kind - facts first, code before the patterns, a capital only on OneUptime's own words, no "p50 0 ms", "In each of", "Slowest request" / "A failed request", escaping.App/Tests/Dashboard/AIInsightMonitorPrefill.test.ts: the failing operation's Traces monitor (scope, Error status, hour, floor, words, severity, no service id), a saveable prefill (fromJSON, validation, criteria pair, no telemetry text in any sentence), the two refusals,isAIInsightMonitorOffered, the hour is an option of the trace form.Common/Tests/App/Dashboard/AIInsightMonitorPrefillContracts.test.ts: the floor is the detector's (pickFailingOperationsfiles at 20, not 19), the step query the worker compiles,TraceMonitorCriteriafires at 20 and clears at 19, and the steps form keeps the prefill as built.AIInsightViewCreateMonitor.test.tsx: failing - enabled, to Monitor Create with the finding; slow - disabled with its reason; missing tracing - no button.MonitorCreateFromAIInsight.test.tsx: the real Monitor Create page opens on the Traces monitor, and says the slow operation's reason instead of a form.MonitorStepsDefaultStatusAdvanced.test.tsx: steps prefilled as JSON load their statuses, with no error.TelemetryAiFixCopy.test.ts: the strip layout is keyed to its container, never the window; the button never wraps; both strips use it.TelemetryAiCopy.test.ts: no line promises a pull request for each problem.TraceProblemDetector.test.ts: the evidence line as written now.App/Tests/FeatureSet/Docs/TracesAiDocsFacts.test.ts: the two new docs statements, pinned to the copy and the prefill.E2E/TracesAi/TracesAi.spec.tsgains 3 tests at 1280 and 390 (the evidence as written, Create Monitor on each kind, the picker stacked in the rail and side by side at 1024) and the new copy;E2E/Profiles/ProfilesAi.spec.tsgains the Profiler finding page's picker. Traces AI: 40 tests, 1.5 minutes with its bundle locally (from 1.3). It now runs in App Test group 1, not 8: group 8 took 22.4 minutes on master's last green run without it (group 1: 14.9), so with it group 8 would have passed the 22-minute mark; group 1 is about 16.5 now. Profiles: about 3 seconds more in group 7.Verification (after merging master c2af2b0): type-checks clean for Common, Common compile-tests (all three programs), the Dashboard, App (its Tests included;
--listFilesnames nothing outside App and Common) and E2E. Common jest: the guard suites plus every suite that reads a changed file, the locale suites and the guard-like suites the batch named - 297 suites, 10,152 tests, all pass. App jest: the root-level guards, DashboardLocalesGuard, CardDescriptionBoilerplateGuard, the locale suites and the Dashboard and docs suites that read the changed files - 66 suites, 2,560 tests. Docs: the five suites that read the Traces Explorer page (2,155 tests) and the generalTests/FeatureSet/Docs/Docssuites (29 suites, 1,419 tests);docs:check-anchors,i18n:checkandi18n:validateclean. Changed suites again with ee/ hidden (346 tests) and with BILLING_ENABLED=true (156). Repo-root Tests/Ops: 71 suites pass. Offline browsers: Traces AI 40/40, Profiles 71 passed (1 phone skip, as before). Prettier and eslint clean on every changed .ts/.tsx (the fixture .js files are eslint-ignored, as every fixture's). ReDoS checker: no new patterns. Then master moved (#5233): merged again (the 17 locale files by key - each side's new keys, none changed on both),i18n:checkandi18n:extractclean, the Common, Dashboard and App type-checks clean, Common's guards, locale suites and the changed suites (222 suites, 7,926 tests) and App's root-level, locale, locale-guard and docs suites (65 suites, 4,485 tests) all pass, Tests/Ops 71 pass. Not run: a live stack.Seen on master, not this PR's: #5233 (merged while this review ran) grew
test-security-operations-uito 92 tests, 9.9 minutes locally by its own account, in group 8 - which took 22.4 minutes before it. Group 8 may now run near the job's 30 minutes; worth watching on master's next App Test run.Left as they are: Logs do not show an investigation's verdict (why a failing operation got no pull request) - the entry carries it, but showing it needs words for each verdict in both lanes: a follow-up. The Traces monitor type's own card says "Alert on span latency and error rate", while trace monitors count spans - not this PR's. Some AI Insights words are still English in most locales ("Needs Attention", "Fix Opened", the Details labels) - the AI Insights product's backlog, as the Profiler's review noted.
🤖 Generated with Claude Code