Global Analysis View: error + console output traces
- Dominant language
- JavaScript
- Stars
- 171
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
* [x] review comments of https://github.com/Domiii/dbux/pull/641/
* [x] Add a new `Global` view beneath `TDView` (`class GlobalAnalysisView`)
* [x] since this should collect information spread over all active apps, we probably could benefit from a new function `ApplicationSet.collectGlobalStats(utilName, ...args)` that returns an array of `const f = dpUtil[utilName]; return f.call(dpUtil, ...args);` of all apps in the set.
* [x] fix `DebugAppTDNode` to be `GlobalDebugNode`, change it to get all app data, and move it to this view.
* [x] move `Pathways button` to `ApplicationView`, add a copy of `call graph button` to `GlobalView`
* [x] (maybe add a copy of `call graph button` to the top/tab bar, if there are any recorded applications?
* [x] add a new `GlobalErrorsNode` (lists all error traces) to it (see `ErrorTraceManager`?)
* [x] roots = leafs of error tree (leafs are a subset of all root causes)
* [x] each error's children are its asynchronous stack's error traces (in DESC order of `traceId`)
* [x] add some tests w/ asynchronous error stack
* [x] `await`
* [x] promise
* [x] when clicking the error button:
* cycle through the "error leaves"
* reveal the relevant error node in this view
* [x] add a copy of the "error button" to the header of this view as well
* [x] test w/
* [x] `express#5`
* [x] `sequelize#4`
* [x] `sequelize#5`
* [x] create a new generalized node class `TraceContainerNode` that provides the same interface for grouping (maybe sorting) of traces. It should only be used to contain `TraceNode` children.
* [x] it should provide the same grouping buttons as `ExecutionsTDNode`
* [x] `ExecutionsTDNode` should instead inherit from `TraceContainerNode`
* can we also generalize the system so it works for `DataFlow` nodes in the `DataFlowView`?
* [x] add a `console` node
* [x] add instrumentation to identify console `BCE` traces
* [x] render all such traces as its children (and ofc add to `DataProviderUtil`)
* -> `dp.indexes.traces.byPurpose.get(TracePurpose.Console)`
* -> `dp.util.renderConsoleMessage(consoleCallId)`
* [x] `class ConsoleNode extends TraceContainerNode { }`
## Remaining problems:
* [ ] Only works with a singular application (→ enable multi application support)
* → this affects groups, because they don't take `applicationId` into account when grouping
* → for now:
* if a set of candidate traces is from more than one application: add them to separate "application super groups"
* else (only one application): no change
* [ ] a context on an already erroneous error stack could throw a new error (in case of `catch` and `finally`)
* -> find those and add those to root as well
* -> needs `CatchExit`?
* [ ] add pretty/representative screenshot to docs
* (at `docs_site/content/02-using-dbux/07-global.mdx`)
Contributor guide
Assessment
This issue has not been assessed yet.