### **User description** ## Problem Fixes openobserve/o2-enterprise#1229 Alert graphs were not rendering edges (arrows) when nodes had identical timestamps, causing the topology graph to show nodes without connections. ## Root Cause The edge creation logic used strict timestamp inequality (`<`, `>`), which failed when alerts fired at the exact same microsecond. This commonly occurs with: - High-frequency alerting - Bulk alert ingestion - Simulated/test data with fixed timestamps - Clock resolution limitations ## Solution Added timestamp tiebreaker logic using node index (insertion order) for all three edge creation scenarios: 1. **Same-service temporal edges**: Connect to most recent previous node, use index as tiebreaker 2. **Cross-service temporal edges**: Connect to chronologically closest node, use index as tiebreaker 3. **Service dependency edges**: Connect related services, use index as tiebreaker ## Changes - `src/service/alerts/incidents.rs`: Updated 3 edge creation locations with timestamp + index comparisons ## Impact - ✅ Edges now created even when alerts have identical timestamps - ✅ Deterministic behavior based on insertion order - ✅ Graph visualization shows proper alert flow with arrows - ✅ Root cause analysis now possible ## Testing - Verified code compiles successfully - Manual testing recommended with alerts at same timestamp ___ ### **PR Type** Bug fix ___ ### **Description** - Add tiebreaker for equal timestamps - Ensure deterministic topology edge creation - Fix missing incident graph arrows ___ ### Diagram Walkthrough ```mermaid flowchart LR A["New alert node added"] --> B["Find candidate prior/next nodes"] B --> C["Compare (first_fired_at, node_index)"] C --> D["Create temporal/dependency edges deterministically"] ``` <details> <summary><h3> File Walkthrough</h3></summary> <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Bug fix</strong></td><td><table> <tr> <td> <details> <summary><strong>incidents.rs</strong><dd><code>Deterministic edge creation for equal timestamps</code> </dd></summary> <hr> src/service/alerts/incidents.rs <ul><li>Add index-based tiebreaker for same-service edges<br> <li> Allow dependency edges when timestamps equal<br> <li> Refine cross-service temporal matching with index<br> <li> Update ordering keys to include node index</ul> </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/10347/files#diff-2411d921fd8b8783c049deea11da06726ed986550d405477d486234892353ca9">+17/-5</a> </td> </tr> </table></td></tr></tr></tbody></table> </details> ___
web
This template should help get you started developing with Vue 3 in Vite.
Recommended IDE Setup
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
Type Support for .vue Imports in TS
TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensionsfrom VSCode's command palette - Find
TypeScript and JavaScript Language Features, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Windowfrom the command palette.
Customize configuration
See Vite Configuration Reference.
Project Setup
npm install
Compile and Hot-Reload for Development
For stand-alone UI development environment, create .env file and which contains below environment variable
VITE_OPENOBSERVE_ENDPOINT=http://localhost:5080/
npm run dev
Type-Check, Compile and Minify for Production
npm run build
Run Unit Tests with Vitest
npm run test:unit
Run End-to-End Tests with Cypress
npm run test:e2e:dev
This runs the end-to-end tests against the Vite development server. It is much faster than the production build.
But it's still recommended to test the production build with test:e2e before deploying (e.g. in CI environments):
npm run build
npm run test:e2e
Lint with ESLint
npm run lint