Commit Graph
4841 Commits
Author SHA1 Message Date
Abhay Padamaniandgreptile-apps[bot] c39bc2cbdd fix: promql query legend config suggestion issue for dashboard (#9691)
### **PR Type**
Enhancement


___

### **Description**
- Dynamic PromQL field suggestions from groupedFields schema

- Added `watch` import for additional reactivity


___



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>ConfigPanel.vue</strong><dd><code>Refactor PromQL
suggestion logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/dashboards/addPanel/ConfigPanel.vue

<ul><li>Imported <code>watch</code> alongside <code>markRaw</code> and
<code>watchEffect</code><br> <li> Removed static
<code>meta.stream.selectedStreamFields</code> mapping<br> <li> Computed
<code>dashboardSelectfieldPromQlList</code> from
<code>groupedFields.schema</code><br> <li> Added null checks for current
stream and schema</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9691/files#diff-c3a6e64dff02b58bb7cdc3f0668990b41ff41544b4c5e991bbcd989ad4bba3f8">+26/-11</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-12-19 18:46:23 +05:30
Abhay Padamani d8fd966fef fix: custom chart example pop up background issue for dark mode (#9683)
### **PR Type**
Bug fix, Enhancement


___

### **Description**
- Introduce dynamic classes for dark/light modes

- Import and use `useQuasar()` to access `$q.dark.isActive`

- Extend scoped SCSS for dark and light color themes


___



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>CustomChartTypeSelector.vue</strong><dd><code>Enhance
dark mode styling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>


web/src/components/dashboards/addPanel/customChartExamples/CustomChartTypeSelector.vue

<ul><li>Bind dynamic dark/light CSS classes to root, header, sidebar,
and <br>content area<br> <li> Import <code>useQuasar</code> and expose
<code>$q</code> in setup for theme detection<br> <li> Add scoped SCSS
rules for dark and light mode color palettes<br> <li> Update scrollbar
styling to match dark mode</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9683/files#diff-aa1bf1de18f25fc247cd9495d92d9d5cdb0153e7fd80148f460d90809204bd29">+84/-17</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-12-19 18:15:34 +05:30
a51605938e feat: dashboard copy legends and table cells (#9677)
### **PR Type**
Enhancement


___

### **Description**
- Add "Show Legends" feature for chart panels
  - PanelContainer and AddPanel integrated dialog
  - PanelSchemaRenderer emits show-legends event
  - New ShowLegendsPopup component for listing and copying legends

- Add copy button to table cells in TableRenderer

- Update translations with legend labels


___

### Diagram Walkthrough


```mermaid
flowchart LR
  PanelSchemaRenderer["PanelSchemaRenderer"] -- "show-legends" --> ShowLegendsPopup["ShowLegendsPopup"]
  TableRenderer["TableRenderer"] -- "copy-cell" --> Clipboard["Clipboard"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>5
files</summary><table>
<tr>
<td><strong>PanelContainer.vue</strong><dd><code>Integrate
ShowLegendsPopup dialog and state</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-414737cba6064461f7026e0b016afcb9620bd5bb29c4708fc170dee789dbcd4d">+23/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>PanelSchemaRenderer.vue</strong><dd><code>Add "Show Legends"
button and emit event</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-e5376e7e77bf3aaf6590c2522d8c2dbffcc95a8006ae0d6dc0040a37825367d6">+31/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>ShowLegendsPopup.vue</strong><dd><code>New component for
legends list and copying</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-e02401241391109f2082ad6742374ff47ad79af8abf37a4bfa6ebeaae3f11322">+377/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>TableRenderer.vue</strong><dd><code>Add copy-to-clipboard
button in table cells</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-794706ea9da3a70012a0327c0464f9fd16802f78ece26055fe951716c2d73d59">+80/-15</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>AddPanel.vue</strong><dd><code>Integrate ShowLegendsPopup in
AddPanel view</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
  <td><a href=""></a></td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>11
files</summary><table>
<tr>
<td><strong>de.json</strong><dd><code>Add German translations for legend
feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-78f24ecb2dbcfc38fdf3ec22b2559a5b40d236ea689d1c55f5d3e87168310264">+7/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>en.json</strong><dd><code>Add English translations for
legend feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-892aa3d75ab6e129ef9116aa21bec1b9a15ba69ce5366d2a19128078c690d824">+6/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>es.json</strong><dd><code>Add Spanish translations for
legend feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-ac2a2167b8b973e3f776f9fe3b43bef4576470d8ad33f3d7cfaff6edff0e5778">+7/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>fr.json</strong><dd><code>Add French translations for legend
feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-db80e762b88ddf183820c050cdc6b215e6b02b365b5e73f5152af46b0d26f1a2">+7/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>it.json</strong><dd><code>Add Italian translations for
legend feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-2de78074a5f887afddce60d694ead9322e6ab223eb70251c13819f3028bdc70d">+7/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>ja.json</strong><dd><code>Add Japanese translations for
legend feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-092e49c5f9fbc1b539ab9c2866d108d0ce1d314022b4c294eb4611b285e7bbd3">+7/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>ko.json</strong><dd><code>Add Korean translations for legend
feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-50e27ca1b4825a5026f3a251bfcf79c97cab07cfade2ebd512d332453d707c48">+7/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>nl.json</strong><dd><code>Add Dutch translations for legend
feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-a1706021687ae5d8a1c006c49eab3946174fecd895f9b70a89c2e76d97250906">+7/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>pt.json</strong><dd><code>Add Portuguese translations for
legend feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-38e804f64cb5e0e451849fc84e9b46e53c954a4a4263d51c18665ad45f4b4815">+7/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>tr.json</strong><dd><code>Add Turkish translations for
legend feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-6f0f131e9e2591480c4c5d1eaffc72d02dc31cbd8d3f90d8f012f08cabac8818">+7/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>zh.json</strong><dd><code>Add Chinese translations for
legend feature</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-8818055db58f83230aeea4ebfd4cec31d924e8c47b6f91298e356959ab25339e">+7/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Additional
files</strong></td><td><details><summary>1 files</summary><table>
<tr>
  <td><strong>AddPanel.vue</strong></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9677/files#diff-c9632db1ad95af95aba10161bcbc7c5608318919f228637bdafae3f3a31267e8">+38/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

</details>

___


Design at:
https://github.com/openobserve/designs/blob/main/dashboards/copy-legends-and-table-cells/design-doc.md

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: ktx-akshay <akshay.patil@kiara.tech>
2025-12-19 17:37:35 +05:30
Abhay Padamani 1010b44e2e fix: metrics page query editor issue (#9688)
- https://github.com/openobserve/o2-enterprise/issues/1053

### **PR Type**
Bug fix


___

### **Description**
- Track stream and type per query index

- Initialize tracking for new queries

- Update watch logic to detect actual changes

- Prevent default query reset when unchanged


___



<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>FieldList.vue</strong><dd><code>Add per-query stream
tracking</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

web/src/components/dashboards/addPanel/FieldList.vue

<ul><li>Added <code>queryStreamTracking</code> to record per-query
stream and type<br> <li> Initialized tracking for existing and newly
accessed queries<br> <li> Enhanced watch callback to compare previous vs
current values per <br>query<br> <li> Guarded default query setting to
actual stream/type changes</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9688/files#diff-a071c06e3e26629cb4ae4751450acc39c61fa49b07a1cc4be3711697829668d4">+50/-3</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-12-19 16:53:42 +05:30
Neha PandClaude 24b024a502 test: automation for bugs fixes (#9678)
### **User description**
## Summary
Refactored the logs regression test suite to follow the Page Object
Model (POM) pattern by centralizing all locators in the logsPage.js POM
file and updating test files to use these locators instead of hardcoded
selectors.


## Testing
All 10 regression tests passing:
- ✅ Absolute time error validation
- ✅ Stream switching with saved views (#9388)
- ✅ Field values with SUBQUERY/CTE/GROUP BY (#7751)
- ✅ Pagination count after search (#8868)
- ✅ Alert graph color display (#9311)
- ✅ Histogram query from history (#8180)
- ✅ Timestamp field in quick mode (#8180)
- ✅ Source field display logic (#8180)

Test execution: 10/10 passed in 7.2 minutes


___

### **PR Type**
Tests, Enhancement


___

### **Description**
- Refactor logs regression tests to Page Object Model
  - Centralize all locators in `logsPage.js`

- Add new POM locators for regression tests

- Add regression tests for bug #7751 (subquery, CTE, GROUP BY)

- Add regression tests for bug #8868 (pagination count update)

- Add regression test for bug #9311 (alert graph color)

- Add regression tests for bug #8180 (histogram, timestamp, source
field)


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["logsPage.js: New POM locators"] --> B["logs-regression.spec.js: Bug regression tests"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>logsPage.js</strong><dd><code>Add POM locators for
regression tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/pages/logsPages/logsPage.js

<ul><li>Added alert-related selectors (<code>alertsMenuItem</code>,
<code>alertGraph</code>, <code>alertChart</code>)<br> <li> Added query
history selectors (<code>queryHistoryButton</code>,
<code>historyPanel</code>)<br> <li> Added table and pagination selectors
(<code>tableBottom</code>, <code>tableBodyRow</code>,
<br><code>tableHeaders</code>)<br> <li> Added dynamic field selector
functions (<code>fieldExpandButton</code>,
<br><code>subfieldAddButton</code>, etc.)<br> <li> Added streams search,
error indicators, timestamp detail selectors</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9678/files#diff-8045b343491d8943869c1af74cdafab204dc49c02a70294417e73f47d35e0b59">+29/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>logs-regression.spec.js</strong><dd><code>Add
regression tests for major log search bugs</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/playwright-tests/RegressionSet/logs-regression.spec.js

<ul><li>Added tests for bug #7751: subquery, CTE, GROUP BY field
expansion<br> <li> Added test for bug #8868: pagination count after
filtering<br> <li> Added test for bug #9311: full alert graph color
rendering<br> <li> Added tests for bug #8180: histogram query, timestamp
in quick mode, <br>source field logic</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9678/files#diff-99da86ede55fa5f2e3d3fbef897ba7aaa5a7db702a0135f66ac4c888fc7311b6">+538/-0</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-19 16:11:51 +05:30
ktx-vaidehi 5d5ddf922a fix: dashboard custom chart query splitter (#9651)
### **PR Type**
Bug fix


___

### **Description**
- Add overflow hidden to query editor container


___



<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>AddPanel.vue</strong><dd><code>Hide overflow in
splitter container</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/views/Dashboards/addPanel/AddPanel.vue

- Added `overflow: hidden` style to the fixed-height div


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9651/files#diff-c9632db1ad95af95aba10161bcbc7c5608318919f228637bdafae3f3a31267e8">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-12-19 15:15:37 +05:30
Shrinath RaoandClaude Opus 4.5 660dfbabaf test: Dashboard Joins and Nested Functions e2e tests (#9685)
### **PR Type**
Tests, Enhancement

---

### **Description**

This PR adds comprehensive E2E tests for Dashboard Joins and Dashboard
Functions features, along with supporting page object helpers.

#### Key Changes:
- **Dashboard Joins Tests**: 8 consolidated multi-panel tests covering
INNER/LEFT/RIGHT joins, conditions, aggregations, field selection,
filters, dynamic operations, persistence, and error handling
- **Dashboard Functions Tests**: 2 multi-panel tests covering basic
(COUNT, COUNT-DISTINCT, AVG, SUM) and advanced (Multiple Y-axis, MIN,
MAX) aggregation functions
- **New `JoinHelper` class**: Provides methods for configuring join
types, streams, conditions, and operators
- **Enhanced `ChartTypeSelector`**: Added Y-axis function configuration
methods and stream selection with retry mechanism
- **Org Context Fix**: Navigate directly to dashboards with
`org_identifier` parameter to ensure correct API context

---

### **Test Coverage**

#### Dashboard Joins Tests (`dashboard-join.spec.js`) - 8 Tests

| # | Test Name | Panels | Coverage | Tags |
|---|-----------|--------|----------|------|
| 1 | Core Join Types - INNER, LEFT, RIGHT | 3 | INNER JOIN (11 rows),
LEFT JOIN (12 rows), RIGHT JOIN (5 rows) | `@dashboard-joins`, `@smoke`,
`@P0` |
| 2 | Join Conditions & Multi-Join | 3 | Multiple AND conditions, 3-way
join, OR conditions | `@dashboard-joins`, `@dashboard-joins-conditions`,
`@P1` |
| 3 | Aggregation Functions | 4 | Basic aggregation, SUM-like grouping,
AVG-like grouping, COUNT grouping | `@dashboard-joins`,
`@dashboard-joins-aggregation`, `@P1` |
| 4 | Field Selection | 4 | response_time_ms, country, bytes, request_id
fields | `@dashboard-joins`, `@dashboard-joins-fields`, `@P2` |
| 5 | Filters & Edge Cases | 6 | Join with filter, LEFT JOIN with NULLs,
session duration, not-equal (!=), greater-than (>), self-join |
`@dashboard-joins`, `@dashboard-joins-filters`, `@P2` |
| 6 | Dynamic Join Operations & UI Validation | 1 | Add/remove joins,
change join types, modify conditions | `@dashboard-joins`,
`@dashboard-joins-dynamic`, `@P2` |
| 7 | Persistence - Save and Reload Dashboard | 1 | Save panel, navigate
away, reload, verify join config persisted | `@dashboard-joins`,
`@dashboard-joins-persistence`, `@P2` |
| 8 | Error Handling & Recovery | 1 | Incomplete join handling, recovery
from invalid state | `@dashboard-joins`, `@dashboard-joins-errors`,
`@P3` |

#### Dashboard Functions Tests (`dashboard-nested-functions.spec.js`) -
2 Tests

| # | Test Name | Panels | Coverage | Tags |
|---|-----------|--------|----------|------|
| 1 | Basic Aggregation Functions | 4 | COUNT, COUNT-DISTINCT, AVG, SUM
functions | `@dashboard-functions`, `@dashboard-functions-basic`, `@P1`
|
| 2 | Advanced Aggregation Functions | 2 | Multiple Y-axis (COUNT + SUM
+ AVG), MIN + MAX functions | `@dashboard-functions`,
`@dashboard-functions-advanced`, `@P2` |

---

### **New Page Object Methods**

#### `JoinHelper` (`dashboard-joins.js`)
| Method | Description |
|--------|-------------|
| `addJoin()` | Open add join popup |
| `selectJoinType(type)` | Select INNER/LEFT/RIGHT/FULL/CROSS join |
| `selectJoinStream(streamName)` | Select stream to join with |
| `selectLeftField(field)` | Select left side join field |
| `selectRightField(field)` | Select right side join field |
| `selectOperator(operator)` | Select =, !=, <, >, <=, >= operator |
| `addCondition()` | Add another join condition |
| `saveJoin()` | Save join configuration |
| `removeJoin(index)` | Remove a join by index |
| `verifyJoinChipVisible(stream, index)` | Verify join chip displays
correctly |

#### `ChartTypeSelector` (`dashboard-chart.js`)
| Method | Description |
|--------|-------------|
| `selectStream(name, retries)` | Select stream with retry mechanism |
| `configureYAxisFunction(alias, func)` | Configure Y-axis aggregation
function |
| `verifyYAxisLabel(alias, func)` | Verify Y-axis label shows function |
| `openYAxisFunctionPopup(alias)` | Open Y-axis configuration popup |
| `selectFunction(name)` | Select aggregation function from dropdown |

#### `DashboardPanelActions` (`dashboard-panel-actions.js`)
| Method | Description |
|--------|-------------|
| `addNextPanel()` | Add another panel after saving |
| `getTableRowCount()` | Get count of data rows in table |
| `verifyChartRenders(expect)` | Verify chart/table renders |
| `savePanel()` | Save panel with networkidle wait |

---

### **Test Data**

Test data files located in `test-data/` directory:
- `joins/test_app_users.json` - 5 user records
- `joins/test_web_requests.json` - 12 web request records  
- `joins/test_sessions.json` - 8 session records
- `dashboard-functions/test_records.json` - 7 records with user_name and
score fields

---

### **Fixes Included**

| Issue | Fix |
|-------|-----|
| Org context mismatch on remote environments | Navigate to
`/web/dashboards?org_identifier=${ORGNAME}` |
| Streams not appearing in dropdown | Page reload after dashboard
creation to refresh stream list |
| Save panel race condition | Added `waitForLoadState("networkidle")`
after save click |
| Stream selection timing | Retry mechanism with debug logging |
| Test 5 timeout | Increased to 5 minutes for 6-panel test |

---

<details><summary><h3>File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>5
files</summary><table>
<tr>
<td><strong>dashboard-chart.js</strong><dd><code>Enhance stream
selection and add Y-axis function methods</code>&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-573a312576fce62d8e14f2bbb5f9b7d9a552d746304dce3d79862edddd24de76">+106/-14</a></td>
</tr>
<tr>
<td><strong>dashboard-create.js</strong><dd><code>Add smart panel
addition for empty and existing dashboards</code></dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-c3c5add2b934580a91a79bb580634b70e2376b0452113008a0911102db3863e2">+25/-1</a>&nbsp;
&nbsp; </td>
</tr>
<tr>
<td><strong>dashboard-joins.js</strong><dd><code>New JoinHelper for
configuring and validating joins</code>&nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-f88eb0cf951ec45e97befde5c83a2c187bb46db3f6cb27bc0cb88d48c5f45b78">+351/-0</a>&nbsp;
</td>
</tr>
<tr>
<td><strong>dashboard-panel-actions.js</strong><dd><code>Add next-panel,
row count and chart render verifications</code>&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-d29713fdcc11cbc93bda29da5261da389226cd718e4292a1c2cd96629f573a80">+76/-1</a>&nbsp;
&nbsp; </td>
</tr>
<tr>
<td><strong>global-setup.js</strong><dd><code>Include org_identifier in
login navigation URL</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-06323dad7214f86b41b62e121e716eeea0054bc4d950c6bcf4a0efe53894acc8">+4/-3</a>&nbsp;
&nbsp; &nbsp; </td>
</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>6
files</summary><table>
<tr>
<td><strong>dashboard-join.spec.js</strong><dd><code>Consolidated
dashboard joins feature E2E tests</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-552f4ba6f199ade20dbab2c54b8573422fd644587ed1575262a7aa34f8041174">+1160/-0</a></td>
</tr>
<tr>

<td><strong>dashboard-nested-functions.spec.js</strong><dd><code>Multi-panel
dashboard functions E2E tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-d2a9855da60f5fd3820832815036c368a680e2885033ad1a7a2bcbd060e2a750">+372/-0</a>&nbsp;
</td>
</tr>
<tr>
<td><strong>test_records.json</strong><dd><code>Add test data for
dashboard functions tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-3a09d97f4091ae2f4dc97ebc14199c5d94efb878a6ebfa7da686cad5450ddda0">+7/-0</a>&nbsp;
&nbsp; &nbsp; </td>
</tr>
<tr>
<td><strong>test_app_users.json</strong><dd><code>Add user data for
dashboard joins tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-7c5af3decd88c4f9031fd83282844872f4a0a65eea2b51a46aac849aa4a5c129">+7/-0</a>&nbsp;
&nbsp; &nbsp; </td>
</tr>
<tr>
<td><strong>test_sessions.json</strong><dd><code>Add session data for
dashboard joins tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-836e072600882ffa58662a4867ac17d2ce799dd338daac585203ccaa01275e3c">+10/-0</a>&nbsp;
&nbsp; </td>
</tr>
<tr>
<td><strong>test_web_requests.json</strong><dd><code>Add web request
data for dashboard joins tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-1c4b00b1929e9a01de1cb8129161c49dc1563a5dde1c4b5e770a307245155382">+14/-0</a>&nbsp;
&nbsp; </td>
</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>cleanup.spec.js</strong><dd><code>Extend cleanup regex for
join and function test streams</code>&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9685/files#diff-c214275a512fa285a7e4f2ab61dfcb42d71a0436b0e4241f94d7b45693587983">+8/-1</a>&nbsp;
&nbsp; &nbsp; </td>
</tr>
</table></details></td></tr></tbody></table>

</details>

---

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-19 07:30:12 +05:30
Abhay Padamani 06ab60599b fix: allow to create alert from anywhere from dashboard chart (#9682)
### **PR Type**
Enhancement


___

### **Description**
- ChartRenderer emits `domcontextmenu` on right-click anywhere

- PanelSchemaRenderer handles `domcontextmenu` for alerts

- Updated event wiring in both renderer components

- Minor refactor of `notMerge`/`lazyUpdate` formatting


___

### Diagram Walkthrough


```mermaid
flowchart LR
  CR["ChartRenderer"] -- "domcontextmenu" --> PSR["PanelSchemaRenderer"]
  PSR -- "handleCreateAlert" --> AL["Alert creation flow"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>PanelSchemaRenderer.vue</strong><dd><code>Add DOM
contextmenu for alert creation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/dashboards/PanelSchemaRenderer.vue

<ul><li>Added <code>@domcontextmenu="onChartDomContextMenu"</code>
listener<br> <li> Refactored <code>onChartContextMenu</code> to only
emit general contextmenu<br> <li> Introduced
<code>onChartDomContextMenu</code> to trigger alert creation<br> <li>
Updated <code>setup()</code> return to include new handler</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9682/files#diff-e5376e7e77bf3aaf6590c2522d8c2dbffcc95a8006ae0d6dc0040a37825367d6">+6/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>ChartRenderer.vue</strong><dd><code>Implement native
contextmenu handler</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/dashboards/panels/ChartRenderer.vue

<ul><li>Added <code>handleNativeContextMenu</code> to capture
right-clicks<br> <li> Emits new <code>domcontextmenu</code> event with
x/y/value payload<br> <li> Registered <code>domcontextmenu</code> in
<code>emits</code> array<br> <li> Minor formatting cleanup of
<code>notMerge</code>/<code>lazyUpdate</code></ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9682/files#diff-353fab39cd76197438814db862c4a506636ea7e15633ee92d9269adbd97fe67c">+67/-3</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-12-18 17:46:31 +05:30
Abhay Padamani acd9af590d fix: do concurrent api call for promql multi query (#9681)
### **PR Type**
Enhancement


___

### **Description**
- Parallelize PromQL queries with Promise.all

- Improve streaming data merge logic

- Refine error handling and formatting


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["panelSchema.queries"] -- "map async streams" --> B["fetchQueryDataWithHttpStream"]
  B -- "stream chunks" --> C["handlePromQLResponse & merge"]
  C -- "update queryResults & state" --> D["state.data"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>usePanelDataLoader.ts</strong><dd><code>Parallel and
refined panel data loader</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/composables/dashboard/usePanelDataLoader.ts

<ul><li>Replaced sequential for-loop with parallel Promise.all map<br>
<li> Refactored result merging for streaming data arrays<br> <li>
Adjusted error message formatting in handler<br> <li> Cleaned up dynamic
variable replacement formatting</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9681/files#diff-5a42e9493a7bcd722b88e61fd38883c4f61001bc9cafa399f65f8eafda3aace9">+37/-23</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-12-18 17:16:36 +05:30
ac60e181dd feat: dashboard join support for auto sql (#9343)
# Nested Functions and Joins - User Guide

## Overview

This guide covers two powerful features that enable sophisticated data
analysis in OpenObserve:

- **Nested Functions**: Combine multiple functions together to create
complex calculations
- **Joins**: Merge data from multiple streams (data sources) based on
common fields

These features work in the **Auto SQL** mode of dashboard panels,
allowing you to write advanced queries without deep SQL knowledge.

---

## What's New

### Why These Features?

**Before:**
- Limited function composition - you could only use basic, single-level
functions
- No way to combine data from multiple streams in one query
- Complex analytics required exporting data and manual processing

**Now:**
- Compose unlimited nested functions with full DataFusion support
- Join multiple streams directly in the dashboard panel editor
- Create sophisticated analytics queries with a visual interface

### Key Benefits

✓ Calculate complex metrics (error rates, percentiles, conditional
aggregations)
✓ Build advanced dashboards without custom code
✓ Support for all DataFusion aggregate and scalar functions

---

## Nested Functions

### What Are Nested Functions?

Nested functions let you combine multiple functions together - using the
output of one function as input to another. Think of it like a cooking
recipe where each step builds on the previous one.

**Simple Example:**
- Basic: `AVG(response_time)` - calculates average response time
- Nested: `ROUND(AVG(response_time), 2)` - calculates average AND rounds
it to 2 decimal places

### Supported Functions

OpenObserve supports **all DataFusion functions**, giving you powerful
analytics capabilities:

**Aggregate Functions** (work across multiple rows):
- `count`, `sum`, `avg`, `min`, `max` - basic aggregations
- `median`, `stddev`, `variance` - statistical functions
- `percentile_cont` - calculate percentiles (e.g., p95, p99)
- `string_agg` - combine text values

**Mathematical Functions**:
- `round`, `ceil`, `floor` - rounding operations
- `abs`, `power`, `sqrt` - mathematical operations
- `log`, `log10`, `log2` - logarithmic functions
- `sin`, `cos`, `tan` - trigonometric functions

**String Functions**:
- `concat`, `upper`, `lower`, `trim`
- `substring`, `length`, `replace`

**Conditional Functions**:
- `CASE WHEN ... THEN ... ELSE ... END` - conditional logic
- `COALESCE` - return first non-null value

📖 **Full Reference**: [DataFusion Aggregate
Functions](https://datafusion.apache.org/user-guide/sql/aggregate_functions.html)
| [DataFusion Scalar
Functions](https://datafusion.apache.org/user-guide/sql/scalar_functions.html)

---

### Using Nested Functions (Step-by-Step)

#### Step 1: Create or Edit a Dashboard Panel

Open your dashboard and create a new panel or edit an existing one. Make
sure you're in **Auto SQL** mode (not Custom SQL).

#### Step 2: Select a Function

In the Y-Axis or column configuration, click **Select Function** to
choose your base function.

<img width="795" alt="Nested Function - Adding Layers"
src="https://github.com/user-attachments/assets/0b6b134e-59b8-48b1-a4ae-52fb4800d772"
/>

In this example, we're using the `Concat` function to combine multiple
fields (namespace and pod name).

#### Step 3: Add Nested Layers

Click the function icon to add another function layer. You can nest
functions multiple times.

<img width="793" alt="Nested Function - Select Base Function"
src="https://github.com/user-attachments/assets/4bd9e03e-1104-4e82-b2ec-a34e6bb64870"
/>


Here we're building a nested function:
- Inner layer: `Avg(severity)` - calculates average severity
- Outer layer: `Ceil()` - rounds up the average to the nearest integer

#### Step 4: Build Complex Expressions

For advanced analytics, you can combine nested functions with
conditional logic using `CASE WHEN` statements.

<img width="1340" alt="Complex Nested Function with CASE WHEN"
src="https://github.com/user-attachments/assets/4c3e3623-bfad-44c4-a760-e10cc94d4a95"
/>

This example shows a sophisticated calculation:
```sql
ROUND(100.0 * SUM(CASE WHEN COALESCE(severity, 0) >= 4 THEN 1 ELSE 0 END) / COUNT(_timestamp), 2)
```

**What this does:**
1. `COALESCE(severity, 0)` - replaces null severity with 0
2. `CASE WHEN severity >= 4 THEN 1 ELSE 0` - returns 1 for high
severity, 0 otherwise
3. `SUM(...)` - counts high severity events
4. Divide by `COUNT(_timestamp)` - calculates percentage
5. Multiply by `100.0` - converts to percentage
6. `ROUND(..., 2)` - rounds to 2 decimal places

**Result**: Percentage of high-severity events, rounded to 2 decimals

#### Step 5: View the Generated SQL

Switch to the **Raw** tab to see the complete SQL query that was
generated from your nested function configuration.

<img width="1388" alt="View Generated SQL"
src="https://github.com/user-attachments/assets/d7f6111a-26c6-4dd0-9e9f-e26092fe6368"
/>

You can review the auto-generated SQL in the Query section at the bottom
of the panel editor. The chart visualization updates in real-time as you
build your nested functions.

---

## Joins

### What Are Joins?

Joins allow you to combine data from two or more different streams (data
sources) based on common fields between them.

**Example:**

**employee_data_join** stream:
```json
[
    {"employee_id": 1, "name": "Alice", "department_id": 1},
    {"employee_id": 2, "name": "Bob", "department_id": 2},
    {"employee_id": 3, "name": "Charlie", "department_id": null},
    {"employee_id": 4, "name": "David", "department_id": 1},
    {"employee_id": 5, "name": "Eve", "department_id": 3}
]
```

**dept_data_join** stream:
```json
[
    {"department_id": 1, "department_name": "HR"},
    {"department_id": 2, "department_name": "Engineering"},
    {"department_id": 3, "department_name": "Sales"},
    {"department_id": 4, "department_name": "Marketing"}
]
```

A join lets you combine these streams to see the department name
alongside each employee, matched by `department_id`.

### Types of Joins

OpenObserve supports three types of joins:

| Join Type | Description | When to Use |
|-----------|-------------|-------------|
| **INNER JOIN** | Returns only records with matches in both streams |
When you need data that exists in both sources |
| **LEFT JOIN** | Returns all records from left stream + matching
records from right | When you want all data from your primary source,
with supplemental info where available |
| **RIGHT JOIN** | Returns all records from right stream + matching
records from left | When you want all data from your secondary source,
with supplemental info where available |

> **Note:** UNION and CROSS joins are not currently supported.

---

### Using Joins (Step-by-Step)

#### Step 1: Access the Joins Section

In your dashboard panel editor, locate the **Joins** section. Click the
**+** button to add a join.

<img width="1725" alt="Access Joins Interface"
src="https://github.com/user-attachments/assets/35db4f28-c526-43a2-bdd1-470e188f53d7"
/>

In this example:
- **Primary stream**: `employee_data_join` (contains employee names)
- We'll join it with `dept_data_join` (contains department information)
- The interface shows available fields from both streams in the left
panel

#### Step 2: Configure the Join

Click on the **Joins** dropdown and select the stream you want to join.
Then configure:

1. **Joining Stream**: Select the stream to join (e.g.,
`employee_data_join`)
2. **Join Type**: Choose from LEFT, INNER, or RIGHT using the visual
toggle
3. **On Stream**: Select the target stream (e.g., `dept_data_join`)

<img width="1725" alt="Configure Join Type"
src="https://github.com/user-attachments/assets/35db4f28-c526-43a2-bdd1-470e188f53d7"
/>

The interface displays: **"Performing a Left Join between
employee_data_join and dept_data_join"**

Notice the visual toggle showing three join types:
- **Left** (selected in this example)
- **Inner**
- **Right**

#### Step 3: Define the Joining Clause

Set up the join condition by specifying which fields to match between
the two streams:

**Clause 1:**
- **Select Field** (Left): Choose a field from the first stream (e.g.,
`department_id`)
- **Select Operator**: Choose comparison operator (usually `=`)
- **Select Field** (Right): Choose the matching field from the second
stream (e.g., `department_id`)

You can add multiple clauses using the **+** button for complex join
conditions (e.g., joining on multiple fields or adding additional
filters).

#### Step 4: View the Results

After configuring the join, the data table will show combined results
from both streams.

<img width="1724" alt="Join Results"
src="https://github.com/user-attachments/assets/94ca9f33-6cfa-4ad1-9b84-bee9db34f912"
/>

In this example:
- **Name** column from `employee_data_join` (Alice, Bob, Charlie, David,
Eve)
- **Department Name** column from `dept_data_join` (HR, Engineering, HR,
Sales)
- Data successfully joined on `department_id`

#### Step 5: Review the Generated SQL

Check the **Query** section at the bottom to see the generated SQL:

```sql
SELECT employee_data_join.name as "x_axis_1",
       stream_0.department_name as "x_axis_2"
FROM "employee_data_join"
LEFT JOIN "dept_data_join" AS stream_0
ON employee_data_join.department_id = stream_0.department_id
```

The SQL query shows exactly how OpenObserve is combining your data
streams.

---

---

## Examples

### Example 1: String Concatenation with Nested Functions

**Use Case**: Combine multiple fields into a single display value

```sql
Concat(k8s_namespace_name, '-', k8s_pod_name)
```

This joins namespace and pod names with a hyphen separator.

### Example 2: Statistical Analysis with Nested Math Functions

**Use Case**: Calculate rounded average of a metric

```sql
Ceil(Avg(severity))
```

This calculates the average severity level and rounds up to the nearest
whole number.

### Example 3: Conditional Percentage Calculation

**Use Case**: Calculate percentage of high-severity events

```sql
ROUND(100.0 * SUM(CASE WHEN COALESCE(severity, 0) >= 4 THEN 1 ELSE 0 END) / COUNT(_timestamp), 2)
```

**Breakdown:**
- Handles null values with `COALESCE`
- Counts events where severity >= 4
- Calculates percentage of total events
- Rounds to 2 decimal places

### Example 4: Employee-Department Join

**Use Case**: Show employee names with their department information

```sql
SELECT employee_data_join.name as "Name",
       dept_data_join.department_name as "Department Name"
FROM employee_data_join
LEFT JOIN dept_data_join
ON employee_data_join.department_id = dept_data_join.department_id
```

This displays all employees with their department names, showing null
for employees without a department assignment.

### Example 5: Complex Analytics - Joins + Nested Functions

**Use Case**: Calculate error rate per service with deployment
information

```sql
SELECT
    logs.service_name,
    deployments.version,
    COUNT(*) as total_requests,
    ROUND((COUNT(CASE WHEN logs.status_code >= 500 THEN 1 END) * 100.0 / COUNT(*)), 2) as error_rate_percent
FROM service_logs as logs
LEFT JOIN deployments ON logs.service_name = deployments.service_name
GROUP BY logs.service_name, deployments.version
ORDER BY error_rate_percent DESC
```

This combines:
- Join between service logs and deployment data
- Nested functions for conditional counting and percentage calculation
- Grouping and sorting for analysis

---

## Tips and Best Practices

### Nested Functions Best Practices

✅ **Start Simple**: Build your function one layer at a time
- Begin with inner function: `AVG(response_time)`
- Add outer layers: `ROUND(AVG(response_time), 2)`

✅ **Test Each Layer**: Verify results before adding complexity
- Test the inner function first
- Add one layer at a time and check output

✅ **Handle Null Values**: Use `COALESCE` to avoid unexpected nulls
```sql
COALESCE(AVG(response_time), 0)
```

✅ **Use Clear Aliases**: Name your calculated fields descriptively
```sql
ROUND(AVG(response_time), 2) as avg_response_ms
```

✅ **Check for Division by Zero**: Protect against zero denominators
```sql
CASE
    WHEN COUNT(*) > 0 THEN (SUM(errors) * 100.0 / COUNT(*))
    ELSE 0
END as error_rate
```

### Joins Best Practices

✅ **Choose the Right Join Type**:
- **INNER JOIN**: Both streams must have matching data
- **LEFT JOIN**: Keep all records from primary stream
- **RIGHT JOIN**: Keep all records from secondary stream

✅ **Verify Field Compatibility**:
- Match data types (don't join string to number)
- Ensure field names are correct
- Check that values actually match between streams

✅ **Consider Performance**:
- Join on indexed fields when possible
- Test with limited data first


---


## FAQ

### Q: Can I nest more than 2 functions?

**A**: Yes! You can nest as many functions as needed. Example:
```sql
ROUND(CEIL(AVG(COALESCE(response_time, 0))), 2)
```

### Q: What's the difference between LEFT and RIGHT joins?

**A**:
- **LEFT JOIN**: Keeps all records from the first (left) stream
- **RIGHT JOIN**: Keeps all records from the second (right) stream
- Choose based on which dataset you want to preserve completely

### Q: Can I join more than 2 streams?

**A**: Yes! Click the **+** button in the Joins section to add
additional joins. You can chain multiple joins together.

### Q: Do nested functions impact performance?

**A**: Complex nested functions may take longer to compute, especially
on large datasets. Test with small time ranges first and optimize your
expressions.

### Q: Can I use Custom SQL instead of Auto SQL?

**A**: Yes! If you prefer writing raw SQL, switch to **Custom SQL**
mode. However, Auto SQL provides a visual interface that's easier for
building queries.


---

## Additional Resources

📚 **DataFusion Documentation**:
- [Aggregate
Functions](https://datafusion.apache.org/user-guide/sql/aggregate_functions.html)
- COUNT, SUM, AVG, etc.
- [Scalar
Functions](https://datafusion.apache.org/user-guide/sql/scalar_functions.html)
- ROUND, CONCAT, CASE, etc.

🔗 **OpenObserve Resources**:
- [GitHub Repository](https://github.com/openobserve/openobserve)
- [PR #9343 - Feature
Implementation](https://github.com/openobserve/openobserve/pull/9343)
- [OpenObserve Documentation](https://openobserve.ai/docs/)

💬 **Get Help**:
- [GitHub Issues](https://github.com/openobserve/openobserve/issues) -
Report bugs or request features
- [Community
Discussions](https://github.com/openobserve/openobserve/discussions) -
Ask questions and share ideas

---

Design at: https://github.com/openobserve/designs/tree/main/joins

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Shrinath Rao <shnath@openobserve.ai>
2025-12-18 14:17:23 +05:30
1d05e20a87 fix: patterns ui fixes (#9663)
### **PR Type**
Enhancement


___

### **Description**
- Add dynamic pattern summary text in SearchResult

- Refactor PatternStatistics into computed summary text

- Update UI styling for PatternCard and PatternList

- Improve constant extraction and filtering logic


___

### Diagram Walkthrough


```mermaid
flowchart LR
  SR["SearchResult Component"]
  PS["PatternStatistics Refactor"]
  PC["PatternCard Styling"]
  PL["PatternList Header Styling"]
  SR -- "compute `patternSummaryText`" --> PS
  SR -- "toggle patterns/logs view" --> SR
  PS -- "provide `summaryText`" --> SR
  SR -- "render pattern list/cards" --> PL & PC
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>SearchResult.vue</strong><dd><code>Add dynamic pattern
summary in SearchResult</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/plugins/logs/SearchResult.vue

<ul><li>Add <code>patternSummaryText</code> reactive ref<br> <li>
Conditional pattern summary toggle in UI<br> <li> Enhance constant
extraction with regex split<br> <li> Escape special chars in
<code>match_all</code> clauses</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9663/files#diff-5e65533aa4754bb6d0074fda18ffc1ecacded3b9ca6bc28a161c3f6b12f20195">+40/-17</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>PatternStatistics.vue</strong><dd><code>Simplify
PatternStatistics to summary text</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

web/src/plugins/logs/patterns/PatternStatistics.vue

<ul><li>Replace detailed cards with single summary div<br> <li>
Introduce <code>summaryText</code> computed property<br> <li> Accept
<code>totalEvents</code> and <code>histogramTime</code> props</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9663/files#diff-55950ab8a9ba093fa7462081b33dc7f4af8eb91192e9ad8b642d5474769c6741">+23/-95</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Formatting</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>PatternCard.vue</strong><dd><code>Refine PatternCard
styling classes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/plugins/logs/patterns/PatternCard.vue

<ul><li>Update padding classes (<code>tw-px-2</code>) on row and
columns<br> <li> Replace custom border & hover classes<br> <li> Remove
fixed monospace font size constraint</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9663/files#diff-5ee84ac6fd187a905532b25f0fb3f9fc0640804fed81c924eeafb9f33a384bb6">+8/-8</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>PatternList.vue</strong><dd><code>Polish PatternList
header layout</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/plugins/logs/patterns/PatternList.vue

<ul><li>Simplify header class names and spacing<br> <li> Use CSS var for
header background<br> <li> Add <code>table-head</code> and
<code>table-row-hover</code> utilities</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9663/files#diff-e2daac67b374ee564fa289bbd99f16a7523749e7e830e45fe8f343ae43be0be6">+12/-14</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-12-18 10:56:32 +05:30
Loakesh Indiran cdc49125a3 fix: clear_cache file path (#9674) 2025-12-18 02:07:23 +05:30
Sai NikhilandByteBaker e1e91ad54f fix: incident analysis changes (#9673)
### **PR Type**
Enhancement


___

### **Description**
- Backend: refactor agent_chat_stream for pooling & immediate status

- Frontend: rotating “Observing…” UX & stream event handling

- Incident drawer → full-screen dialog with two-column tabs layout

- Minor UI tweaks: dialogs maximized & list wrapper update


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["agent_chat_stream endpoint"] -->|"get_agent_client()" B["Global pooled client"]
  B -->|"yield processing status" C["text/event-stream start"]
  C -->|"client.query_stream()" D["External RCA Agent Service"]
  D -->|"stream bytes" E["Forward chunks to client"]
  D -->|"on error" F["Yield error event"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>chat.rs</strong><dd><code>Refactor agent chat streaming
& pooling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

src/handler/http/request/agent/chat.rs

<ul><li>Re-export enterprise AgentChat types under
cfg(feature="enterprise")<br> <li> Provide stub types &
init_agent_client for OSS builds<br> <li> Use global OnceCell client for
connection pooling<br> <li> Rewrite streaming: send immediate
"processing" status and handle <br>errors</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9673/files#diff-a0e13f17674a3657690f9e5829da2f1c4a6a957fe8a95f9c44b854643b5fe9b7">+68/-52</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>main.rs</strong><dd><code>Extend AI init to Agent
client</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

src/main.rs

<ul><li>Extend AI init to include agent client startup<br> <li> Update
OpenAPI init log messages</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9673/files#diff-42cb6807ad74b3e201c5a7ca98b911c5fa08380e942be6e4ac5807f8377f87fc">+3/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>SREChat.vue</strong><dd><code>Enhance chat loading UX &
stream handler</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

web/src/components/SREChat.vue

<ul><li>Replace static loading text with rotating “Observing…”
messages<br> <li> Add start/stop rotation & updateAssistantMessage
helpers<br> <li> Support new event types: status, tool_call,
tool_response, error<br> <li> Improve spacing, formatting and error
handling in stream parser</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9673/files#diff-a24e3f6392181aa741979fe1c0cbc6f0f02337de20e6ad2fd6668dd7abe9bada">+131/-62</a></td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>IncidentDetailDrawer.vue</strong><dd><code>Refactor
incident drawer to dialog UI</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/alerts/IncidentDetailDrawer.vue

<ul><li>Switch from QDrawer to full-screen QDialog wrapper<br> <li>
Implement two-column layout with tabs for analysis & triggers<br> <li>
Add tile components for status, severity, alerts, timeline<br> <li>
Themed styling, responsive scrollbars and updated actions</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9673/files#diff-6973d58a5f49658b07d3533d4db5d32cc6430433b51732481e7497243dadb0b0">+531/-179</a></td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>IncidentList.vue</strong><dd><code>Wrap incident detail
in QDialog</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/components/alerts/IncidentList.vue

<ul><li>Wrap IncidentDetailDrawer in QDialog instead of drawer<br> <li>
Update v-model and close event handling</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9673/files#diff-953ad015996758a8c86e489499cd3b0a614501b99b0c9c5c242a299e34c24ff2">+11/-4</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>TracesAnalysisDashboard.vue</strong><dd><code>Maximize
traces dashboard dialog</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

web/src/plugins/traces/metrics/TracesAnalysisDashboard.vue

- Change dialog maximized prop from false to true


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9673/files#diff-d27dd619532ec278c376c09a05d5106fdb38863c3aa1c56e109fc2145a8a5a3a">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: ByteBaker <42913098+ByteBaker@users.noreply.github.com>
2025-12-17 22:07:40 +05:30
udev 61dbc6ff7e fix: pipeline/alert history and trigger schema merge (#9665)
### **User description**
We need to ensure that whenever a trigger stream is being created (be it
meta or non-meta org) we have the complete schema of the stream. This
will prevent history queries from failing with `field not present` error
We need to make pipeline history query against own orgs trigger stream
we need to create filter with the alert ID for single alert


___

### **PR Type**
Bug fix, Enhancement


___

### **Description**
- fix alert history filtering to use key suffix

- fix pipeline history query to own org triggers

- enhance triggers schema initialization logic


___



<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>history.rs</strong><dd><code>Use key suffix filter for
alert history</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

src/handler/http/request/alerts/history.rs

<ul><li>updated alert_id filter to use suffix match<br> <li> removed
LIKE prefix filter escaping logic</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9665/files#diff-1c7483ca7a66b00f13cefdecadd02afbdf4baf93df5629adb8abe5942cfe5357">+3/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>history.rs</strong><dd><code>Query pipeline history
from own org</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/handler/http/request/pipelines/history.rs

<ul><li>replaced META_ORG_ID with dynamic org_id<br> <li> applied own
org context for count and data queries</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9665/files#diff-aa1f4b2b5539a10dbabffb51724c916aac3d6b60e25ec150b54a32a06a6fc5d4">+2/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>triggers_schema.rs</strong><dd><code>Enhance triggers
schema initialization logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/service/self_reporting/triggers_schema.rs

<ul><li>removed META_ORG_ID conditional exclusion<br> <li> eliminated
pre-existence schema check<br> <li> added expected_schema equality check
before merge</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9665/files#diff-135de2980c6c20b6e5c8294e6bfd2c1c3dedb5995a6671a74726579e77ac983c">+16/-21</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-12-17 21:13:38 +05:30
06df3fb784 feat: Issue 9646 promql streaming (#9648)
### **User description**
Design at: dashboard


___

### **PR Type**
Enhancement


___

### **Description**
- Enable HTTP/2 streaming for PromQL queries

- Extend streaming search util with PromQL support

- Add PromQL streaming endpoints in service layer

- Define TypeScript interfaces for PromQL streaming


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Dashboard Loader"] -- "calls stream" --> B["fetchQueryDataWithHttpStream"]
  B -- "chunk data" --> C["handlePromQLResponse"]
  B -- "error" --> D["handlePromQLError"]
  B -- "complete" --> E["handlePromQLComplete"]
  C --> F["state.data update"]
  D --> G["state.errorDetail update"]
  E --> H["final loading false"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>usePanelDataLoader.ts</strong><dd><code>Implement
PromQL streaming in data loader</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

web/src/composables/dashboard/usePanelDataLoader.ts

<ul><li>Remove non-streaming PromQL calls<br> <li> Initialize state for
streaming queries<br> <li> Process each query via
fetchQueryDataWithHttpStream<br> <li> Handle streaming chunks, errors,
completion</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9648/files#diff-5a42e9493a7bcd722b88e61fd38883c4f61001bc9cafa399f65f8eafda3aace9">+193/-73</a></td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>useStreamingSearch.ts</strong><dd><code>Add PromQL
streaming to HTTP streaming hook</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

web/src/composables/useStreamingSearch.ts

<ul><li>Extend StreamResponseType with <code>promql_response</code><br>
<li> Support <code>promql</code> type in fetch/initiate functions<br>
<li> Build GET URL for PromQL streaming endpoint<br> <li> Map
<code>promql_response</code> via convertToPromQLResponse</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9648/files#diff-8fce3e25a161cd458e734bd9b1f98aadefe3482da7b6529a5b1f4fa20ec115e2">+51/-16</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>streaming_search.ts</strong><dd><code>Add PromQL
streaming endpoints to service</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

web/src/services/streaming_search.ts

<ul><li>Add <code>promqlQueryRangeStreamUrl</code> endpoint builder<br>
<li> Add <code>promqlQueryRange</code> streaming request method<br> <li>
Include query, time window and metadata params</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9648/files#diff-6a8e19a226bbf9e7e04903d5818c8fb5c9005a48988419f94d3e63a61ade7c57">+78/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Documentation</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>query.ts</strong><dd><code>Define PromQL streaming
TypeScript interfaces</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

web/src/ts/interfaces/query.ts

<ul><li>Introduce <code>PromQLStreamingPayload</code> and
<code>PromQLQueryPayload</code><br> <li> Add
<code>PromQLStreamingResponse</code> interface</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9648/files#diff-12dd5b3bb9741bbeaa348c0efbbd745d0a582899678738159c6927d34a35191d">+21/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
Co-authored-by: Huaijin <haohuaijin@gmail.com>
Co-authored-by: Abhay Padamani <141122205+ktx-abhay@users.noreply.github.com>
2025-12-17 19:17:18 +05:30
Ashish Kolhe bd647bd341 fix: organizations ep permisions issue (#9667) (#9669)
fixes: https://github.com/openobserve/openobserve/issues/9670


### **PR Type**
Bug fix


___

### **Description**
- Prioritize `META_ORG_ID` user in token validator

- Prioritize `META_ORG_ID` user in credentials validators

- Fallback to first available user when no META membership


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Incoming request"] --> B["get_all_users()"]
  B --> C{"META_ORG_ID user exists?"}
  C -- "yes" --> D["Select META org user"]
  C -- "no" --> E["Select first user"]
  D --> F["Continue validation"]
  E --> F
```



<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>token.rs</strong><dd><code>Prioritize META org user in
token validation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/handler/http/auth/token.rs

<ul><li>Added logic to prioritize <code>META_ORG_ID</code> user<br> <li>
Fallback to first user if META org missing<br> <li> Inserted explanatory
comment for permission rationale</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9669/files#diff-3339b4a964c121766ef87fcec0070f27a2b7085cf81281b53154e53d33cb28cf">+6/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>validator.rs</strong><dd><code>Prioritize META org user
in credentials validators</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

src/handler/http/auth/validator.rs

<ul><li>Applied META org prioritization logic<br> <li> Replaced
<code>all_users.first()</code> with META find or fallback<br> <li>
Updated both <code>validate_credentials</code> and
<code>validate_credentials_ext</code></ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9669/files#diff-f4d4b51574b378a8c372345ea48875834a4eadacfac33fa4d0ceca1e0ef96b35">+14/-2</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-12-17 18:09:47 +05:30
sktrpathi a9b5f8174f fix: eliminate HashMap conversion in service streams for memory reduction (#9662)
### **User description**
## Summary
Replace HashMap conversion with Arrow-native processing to eliminate 350
MB memory waste per 100K-row file during service discovery, resolving
OOM issues during high-volume ingestion.

## Problem
Service correlation was causing OOM due to HashMap conversion overhead:
- Converting Arrow RecordBatch → Vec<HashMap> wasted 350 MB per 100K-row
file
- System memory reached 90% threshold with just 2 concurrent files
- OOM kills during peak ingestion periods

## Solution
Process Arrow RecordBatch directly without HashMap conversion:
- Send RecordBatch through channel instead of Vec<HashMap>
- Call `process_arrow_batch()` instead of `process_records()`
- Remove `record_batch_to_hashmap()` helper (no longer needed)
- Remove `record_batch_size` config (no longer needed)

## Changes
- **parquet.rs**: Updated ingestion path to use Arrow-native processing
- **merge.rs**: Updated compaction path to use Arrow-native processing
- Channel protocol changed from `Vec<HashMap>` to `RecordBatch`
- Consumer calls `process_arrow_batch()` on enterprise processor

## Impact
| Metric | Before | After | Improvement |
|--------|--------|-------|-------------|
| Memory per 100K-row file | 565 MB | 80 MB | **86% reduction** |
| Service discovery time | 2.5s | 1.5s | **1.7× faster** |
| Pattern learning time | 250ms | 2ms | **119× faster** |
| Concurrent file capacity | 2 files (OOM) | 10+ files | **5× increase**
|
| System memory threshold | 90% | 60% | **Stable** |

## Architecture
All core Arrow-native logic is implemented in o2-enterprise:
- `process_arrow_batch()` - Direct Arrow processing
- `observe_arrow_batch()` - Vectorized pattern learning
- Multi-type support: String, Int64, Boolean, Float64
- Zero-copy operations wherever possible

This PR contains only the OSS integration layer that calls these
enterprise methods.

## Testing
- ✅ Builds successfully (both OSS and enterprise)
- ✅ All existing tests pass
- ✅ Feature-gated with `#[cfg(feature = "enterprise")]`
- ✅ Zero impact on non-enterprise builds

## Environment Variables
- ❌ Removed: `O2_SERVICE_STREAMS_RECORD_BATCH_SIZE` (no longer needed)
- ✅ Updated: `O2_SERVICE_STREAMS_CHANNEL_CAPACITY` help text (now
describes Arrow batches)
- ✅ All other variables unchanged

## Deployment Impact
- **Backward compatible** - existing configs continue to work
- **No action required** - system automatically uses optimized code path
- **Can safely remove** `O2_SERVICE_STREAMS_RECORD_BATCH_SIZE` if
explicitly set

## Related
- Depends on: o2-enterprise#XXXX (Arrow-native implementation)
- Resolves: OOM issues during high-volume ingestion
- Implements: PRD_ARROW_NATIVE_SERVICE_DISCOVERY_V2.md

## Checklist
- [x] Code compiles without errors
- [x] No warnings introduced
- [x] Enterprise feature properly gated
- [x] Backward compatible
- [x] Memory reduction verified
- [x] Performance improvement verified

---

**Review focus:**
- Integration points with enterprise code
- Channel protocol changes
- Feature flag usage
- Memory/performance impact


___

### **PR Type**
Enhancement, Bug fix


___

### **Description**
- Send Arrow RecordBatch via channel directly

- Producer: drop HashMap conversion overhead

- Consumer: call process_arrow_batch on batches

- Remove record_batch_size config and conversion helper
2025-12-17 16:51:20 +05:30
ktx-akshayandktx-abhay e96db6332b test(dashboard): fix flaky tests in deployed environment (#9511)
### **User description**
…riables


___

### **PR Type**
Tests, Enhancement


___

### **Description**
- Refine chart-render wait logic with class checks

- Integrate values-stream helper in variable dropdown

- Standardize relative time ranges to 30m

- Improve streaming test with API wait loops


___



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Formatting</strong></td><td><details><summary>2
files</summary><table>
<tr>
<td><strong>apiCleanup.js</strong><dd><code>Remove extraneous newline at
EOF</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-537fe76c0d8e26e81c5f77c83bd0ee35daaa973822105c809bf83171a26b33c5">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>cleanup.spec.js</strong><dd><code>Remove trailing blank
line</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-c214275a512fa285a7e4f2ab61dfcb42d71a0436b0e4241f94d7b45693587983">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Enhancement</strong></td><td><details><summary>4
files</summary><table>
<tr>
<td><strong>dashboard-panel-actions.js</strong><dd><code>Refine
waitForChartToRender class checks</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-d29713fdcc11cbc93bda29da5261da389226cd718e4292a1c2cd96629f573a80">+27/-10</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>dashboard-variables.js</strong><dd><code>Add stream helper
and input typing delay</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-67d38d39bb67f4a0cbfa473ee81ad50b1fffebc40c635417e58905f3c865a6e2">+18/-3</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>dashboard-streaming.spec.js</strong><dd><code>Add API wait
loops in streaming test</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-92f44296937f53cb448371d1c61510c8c910fbecab83b02b8e89490d5832be19">+36/-4</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>streaming-helpers.js</strong><dd><code>Implement
waitForValuesStreamComplete utility</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-ba793998d7c077815ee18543001a519b7d45a9236990b60d256124a4b30d48cb">+65/-1</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>6
files</summary><table>
<tr>
<td><strong>dashboard-geoMap.spec.js</strong><dd><code>Update time range
to 30m</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-6ae8394cd6b915e6d55a179cf6c7dc32992b8ebbd5d9aac177c0cbd1b9f351b3">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>dashboard-html-chart.spec.js</strong><dd><code>Set html
chart time to 30m</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-02c503aa87193168f5aa83c8105c376ea0c4dc45e6c7bd6f255b693bf7ebc462">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>dashboard-multi-y-axis.spec.js</strong><dd><code>Update
multi-y-axis time to 30m</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-e90516a105c0b17c8e04c18e2b67ac10af213dbdd208fa4414cdcb7e377e6ee5">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>dashboard-transpose.spec.js</strong><dd><code>Change
transpose time range to 30m</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-da631007cea76a4bc59e4acd1195b59ae4131cd5208d21a9c1f94d3913911dc4">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>dashboard.spec.js</strong><dd><code>Adjust gauge and table
time ranges to 15m</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-d0fa0042783dc109334b05266edce228bad97adcb568dd1e447920596238e9b4">+5/-5</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>dashboard2.spec.js</strong><dd><code>Standardize dashboard2
time to 30m</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-8c9189e9e3950fff987c45ee8116d89f15f8fdec5baad209bef6f5858f3b3045">+7/-7</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>playwright.yml</strong><dd><code>Fix typo in run_files
list</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9511/files#diff-7afcd2d8f7b49bda74843f209eefb7b2da45f7e7803bf2e4bd636699b76aa2d3">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
2025-12-17 15:23:43 +05:30
Sai Nikhil 51bea7ea3d fix: hide management and insights in alert list (#9555) 2025-12-17 14:03:03 +05:30
udev d8aaefc9c6 fix: trigger stream schema (#9654)
ingest function does not consider fields with null value as part of
schema. for example:
```
{
	"log": "request id : camelcase",
	"test": null
}
```
the inferred schema will only contain `log` . The first push to triggers
stream does not have all the fields populated, fields like `query_took`
and `delay_in_secs` are set to `None` , which are serialized to json
with `null` values.

The fn `ensure_triggers_stream_initialized` updates the schema in the
meta table prior to pushing the actual event such that even if the
actual event does not have all fields or has fields with null values
triggers stream will still have the complete schema.

The problem:

When reporting to own org, we do not run
`ensure_triggers_stream_initialized` for the reporting org. Hence the
inferred schema is incomplete and alert/pipeline history calls fail with
`field does not exist` error.


### **PR Type**
Bug fix


___

### **Description**
- Ensure triggers stream schema before data ingestion

- Add warning log if schema initialization fails

- Refine schema existence check by field count


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["ingest_buffered_data"] --> B["ensure_triggers_stream_initialized"]
  B -- "schema ok or warn" --> C["ingest_reporting_data"]
```



<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>queues.rs</strong><dd><code>Add schema initialization
before ingestion</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/service/self_reporting/queues.rs

<ul><li>Insert schema initialization call before ingestion<br> <li>
Handle errors with warning logs<br> <li> Maintain existing ingestion
logic on failure</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9654/files#diff-ed15a56d4d3becc2dfb3d05af2dac7f92962ec3091199728fa953e6aed7ed767">+8/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>triggers_schema.rs</strong><dd><code>Enhance schema
existence check</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

src/service/self_reporting/triggers_schema.rs

<ul><li>Check existing schema fields before skipping creation<br> <li>
Count fields to verify non-empty schema<br> <li> Improve logs with field
count and creation info</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9654/files#diff-135de2980c6c20b6e5c8294e6bfd2c1c3dedb5995a6671a74726579e77ac983c">+12/-6</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-12-17 12:15:40 +05:30
Yashodhan JoshiandYashodhan Joshi 14a41bf63c fix: handling of cache cleaning for user delete (#9656)
### **User description**
This fixes the issue of how we handle the in-mem cache cleanup for user
deletion, specifically in case where use only has a single org
attributed to them.
This also adds few more error logs so if something goes wrong, we know
that it went wrong instead of silently ignoring that.

Cherry pick of https://github.com/openobserve/openobserve/pull/9655 for
main branch


___

### **PR Type**
Bug fix, Enhancement


___

### **Description**
- Propagate errors and log failures for NATS notifications

- Fix cache watch removal logic for multi-org users

- Add error handling in HTTP user-remove handler


___



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Error
handling</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>org_users.rs</strong><dd><code>Add error logging and
fix cache watch removal</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/service/db/org_users.rs

<ul><li>Replace ignored NATS delete calls with <code>inspect_err</code>
logging<br> <li> Propagate errors from
<code>delete_from_db_coordinator</code><br> <li> Revise
<code>watch</code> to remove multi-org user records from cache</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9656/files#diff-3cbb516ea021b4c03cf4b5f9de2ebcd4a8afee0722a4bcc5c39cb78f485900b6">+24/-14</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>user.rs</strong><dd><code>Log and propagate user delete
notifications</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/service/db/user.rs

<ul><li>Turn ignored delete notification into logged error via
<code>inspect_err</code><br> <li> Propagate errors from
<code>delete_from_db_coordinator</code><br> <li> Maintain super-cluster
delete under enterprise flag</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9656/files#diff-6ee6b0fc9ed03224d4ddf0b7b631c6f81ff7d1d579bdb98d2c5d4453852eb5d6">+3/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>users.rs</strong><dd><code>Enhance HTTP handler error
handling for removals</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/service/users.rs

<ul><li>Replace <code>match</code> with <code>if let Err</code> for
invite deletion logging<br> <li> Add error-check and early return for
<code>db::user::delete</code><br> <li> Handle
<code>org_users::remove</code> errors with logging and HTTP error
response</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9656/files#diff-98da2588a28d62bb2e301d989836125f89f89b76272cd7f75e08ec4deeea5f38">+49/-33</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-12-17 11:24:25 +05:30
Sai Nikhil 807b3ea35d fix: issue 9566 (#9602)
This pr fixes the issue in #9566
2025-12-17 09:55:12 +05:30
Yashodhan Joshi 330a179d1c refactor: file list dump and stream stats (#9236) 2025-12-17 09:44:42 +08:00
Harsh MahajanandHengfei Yang a0c9d319fb fix: adding description as variable to alerts (#9505)
resolves https://github.com/openobserve/openobserve/issues/9460

adding description as variable to alerts

https://github.com/openobserve/openobserve/issues/9460#issuecomment-3616618836

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2025-12-17 06:13:49 +05:30
Bhargav daf23f22c8 feat: safari share url v2 (#9634)
Design at: ui-features/Share-button.md
2025-12-16 18:36:47 +05:30
Neha PandClaude cc3a6110ae test: add ingestion config UI tests (#9643)
### **User description**
- Added IngestionConfigPage POM with 20+ methods for page interactions
- Created 20+ comprehensive tests for ingestion configuration (3 P0, 8
P1, 1 P2)
- Tests cover: Navigation, Copy functionality, Configuration content,
Search
- Fixed all hardcoded waitForTimeout() calls with element-based waits
- Fixed search test selector to use .data-sources-recommended-tabs
.q-tab
- All tests passing (46.3s execution time)


___

### **PR Type**
Tests, Enhancement


___

### **Description**
- Added IngestionConfigPage POM for ingestion interactions

- Introduced comprehensive ingestion configuration tests

- Updated PageManager to include new POM

- Tests cover navigation, copy, content, search


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["PageManager"]
  B["IngestionConfigPage POM"]
  C["Ingestion config tests"]
  A -- "imports" --> B
  C -- "uses" --> A
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>ingestionConfigPage.js</strong><dd><code>Implement
ingestion config page object</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tests/ui-testing/pages/generalPages/ingestionConfigPage.js

<ul><li>Created <code>IngestionConfigPage</code> class<br> <li> Defined
selectors for navigation, tabs, copy, search<br> <li> Implemented
navigation, copy, search, assertion methods<br> <li> Replaced hardcoded
waits with element-based waits</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9643/files#diff-22a47625a9849c4d6b6a0944d864db20d03453666f9cbfaaeb2cf5b57e00d5c5">+147/-0</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>page-manager.js</strong><dd><code>Integrate ingestion
config POM</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

tests/ui-testing/pages/page-manager.js

<ul><li>Imported <code>IngestionConfigPage</code><br> <li> Added
<code>ingestionConfigPage</code> to <code>PageManager</code>
constructor</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9643/files#diff-565eab8b3c767ae50c9d05e591621d14f66b81af84d6b5ea6efe136c1c3933df">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>ingestion-config.spec.js</strong><dd><code>Add
ingestion configuration tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

tests/ui-testing/playwright-tests/Ingestion/ingestion-config.spec.js

<ul><li>Added navigation tests for recommended/custom pages<br> <li>
Added copy functionality tests for Fluentd and Prometheus<br> <li> Added
configuration content validation tests<br> <li> Added recommended page
search and filter test</ul>


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/9643/files#diff-35352597cf8f8ded17cd9c0abac4efb41cb255a1f69f110129a1b0427b4c8870">+159/-0</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-16 17:51:24 +05:30
Sai Nikhil 0a6674f67d fix: go to about page should include org identifier (#9559) 2025-12-16 17:16:22 +05:30
Sai Nikhil 822f664938 fix: clear the user input after selecting single stream (#9552)
This PR fixes the issue in #9540
2025-12-16 12:18:33 +05:30
Shrinath Rao bac710bb41 test(e2e): add language translation coverage tests (#9641)
## Summary
- Add comprehensive Playwright tests for translation coverage across 10
supported languages
- Tests verify translation coverage across all 12 sidebar modules (Home,
Logs, Metrics, Traces, RUM, Pipelines, Dashboards, Streams, Reports,
Alerts, Data Sources, IAM) and their sub-pages
- Implements tiered pass criteria: ≥80% (ideal), 70-79% (acceptable with
warning), <70% (fail)

## Languages Tested
- German (Deutsch)
- Spanish (Español)
- French (Français)
- Italian (Italiano)
- Dutch (Nederlands)
- Portuguese (Português)
- Turkish (Türkçe)
- Japanese (日本語)
- Korean (한국어)
- Chinese Simplified (简体中文)

## Files Added
- `pages/generalPages/languagePage.js` - Page object with all
translation testing logic
- `playwright-tests/LanguageTests/*.spec.js` - Individual test files per
language (10 files)

## Test Plan
- [x] All 10 language tests pass locally (parallel execution ~1.6 min
with 5 workers)
- [x] German at 78% passes as "acceptable" with warning
- [x] Other languages at 88% pass as "ideal"

**Note**: These tests are designed for scheduled/nightly runs, not PR
validation (each test takes ~45s).
2025-12-16 11:14:19 +05:30
udev 19446a3d32 fix: empty user email on grpc metrics ingest (#9608)
check auth can return req without populating metadata, this pr fixes the
case and adds an `IngestUser` type to mark all system initiated
ingestion calls and user initiated ingestion calls
2025-12-16 10:16:37 +05:30
Loakesh Indiran 8277305f16 fix: auto uds to also include fts and indes fields from stream settings (#9512) 2025-12-16 01:01:14 +05:30
Neha P 13f5fa239a test: add Playwright tests for theme management (#9636) 2025-12-15 21:51:19 +05:30
Shrinath Rao 16b5acaaa7 fix(e2e): resolve join test failure with unique stream names (#9635)
## Summary
- Fixed join test failure caused by "stream is being deleted" error
- Uses unique stream names with `testRunId` to avoid conflicts (SDR
pattern)
- `ingestionJoinUnion()` now generates unique stream names like
`e2e_join_a_<runId>`
- `selectIndexAndStreamJoinUnion()` accepts stream names as parameters

## Root Cause
Fixed stream names (`e2e_join_a`, `e2e_join_b`) caused conflicts when
streams were being deleted from previous test runs. The ingestion would
fail with:
```
{"code":400,"message":"Error# stream [e2e_join_a] is being deleted"}
```

## Test plan
- [x] Run `npx playwright test playwright-tests/Logs/join.spec.js --grep
"selecting field and SQL Mode"` - passes
- [x] Cleanup pattern `/^e2e_join_/` already exists in cleanup.spec.js
2025-12-15 18:47:46 +05:30
e182903382 feat: enhancement of dashboard custom chart with examples (#9606)
- https://github.com/openobserve/openobserve/issues/9091
Design at: https://github.com/openobserve/designs/tree/main/customcharts

---------

Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
Co-authored-by: ktx-kirtan <124270523+ktx-kirtan@users.noreply.github.com>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Abhay Padamani <141122205+ktx-abhay@users.noreply.github.com>
2025-12-15 18:10:41 +05:30
Abhay Padamani 6f0f65c606 fix: panel layout issue for print mode single table chart (#9633)
- #9607
2025-12-15 17:12:38 +05:30
Shrinath Rao e0d23c42a7 fix(e2e): resolve SDR test failures with test isolation and retry logic (#9632)
## Summary
- Add unique testRunId to pattern and stream names for test isolation
during parallel execution
- Add retry logic to `checkPatternExists` for backend indexing delays (3
attempts with 2s wait)
- Add search box filtering in `selectStream` for reliable stream
selection in long lists
- Add retry logic for Stream Detail button in stream association page
- Fix ingestion retry with exponential backoff for "stream being
deleted" errors
- Update regexPatternManagement test with unique pattern names to avoid
conflicts

## Test plan
- [x] All 23 SDR tests pass reliably in parallel execution
- [x] Verified tests pass when run individually and as a suite
- [x] No regressions in other test suites
2025-12-15 15:55:46 +05:30
Hengfei YangandLoakesh Indiran c473752df0 fix: cache delta calculate (#9623)
Co-authored-by: Loakesh Indiran <66478092+Loaki07@users.noreply.github.com>
2025-12-15 12:23:58 +08:00
Neha PandClaude 138808f6a7 test: add regression tests for bugs fixes (#9630)
…#9308, #9193, #9117)

Added comprehensive E2E regression test suite for critical UI bugs:

P0 Tests:
- #9337: Query expand icon not working after stream explorer navigation
- #9388: Stream switching shows wrong table fields (BLOCKER)

P1 Tests:
- #9455-1: Download empty results notification (CSV + JSON)
- #9455-2: Download validation without stream selection
- #9308: OpenAPI button redirect from Help menu
- #9193: Enrichment table color contrast in light mode
- #9117: SQL mode conversion with pipe operators

Test Results: 7/7 passing (100%)
- Follows OpenObserve test patterns and page object model
- Proper tagging (@P0/@P1, feature tags, @regressionBugs)
- Comprehensive logging with testLogger
- All tests run independently in parallel

Files:
- tests/ui-testing/playwright-tests/RegressionSet/ui-regression.spec.js

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-13 19:29:38 +05:30
Huaijin 91ae9301e0 refactor: enhance ingester search handle with memtable id (#9625) 2025-12-13 18:27:48 +08:00
Huaijin 6246b7bb27 feat: add peak memory usage to usage report (#9609) 2025-12-13 17:30:51 +08:00
Shrinath Rao 790bd9a0bd test: e2e streams race condition fix (#9631) 2025-12-13 10:18:20 +05:30
Neha PandClaude 45231df7b4 test: refactor and optimize enrichment table tests (#9629)
This commit improves the enrichment table test suite with significant
performance gains and code quality improvements.

## Performance Improvements
- **58% faster execution**: 3.3m → 1.4m
- Moved logs data ingestion from beforeEach to only tests that need it
(2 of 9 tests)
- Removed unnecessary navigation calls after file uploads
- Cleaned up excessive debug logging

## Test Fixes
- Fixed button selector strategy using position-based nth() approach
- Fixed search method - standardized on searchEnrichmentTableInList()
- Fixed disabled field verification using Playwright's toBeDisabled()
- Fixed delete confirmation dialog selector specificity
- Increased authentication timeout from 5s to 15s for first test in
suite

## Code Quality Improvements
- Added helper function setupLogsData() for tests requiring logs
- Added missing tags to 6 tests for better filtering
- Standardized cleanup patterns across all tests
- Improved code comments explaining test flow
- Consistent use of "already on list" pattern

## Test Coverage
- 9 total tests covering:
  1. Upload with exploration
  2. Upload with VRL processing
  3. CSV validation error
  4. Name field validation error
  5. Append functionality
  6. Cancel workflow
  7. Search/filter
  8. Edit mode
  9. Delete confirmation

All 9 tests passing with improved reliability and maintainability.

Files modified:
- tests/ui-testing/pages/generalPages/enrichmentPage.js
- tests/ui-testing/playwright-tests/GeneralTests/enrichment.spec.js
- tests/ui-testing/playwright-tests/utils/enhanced-baseFixtures.js

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-13 07:59:08 +05:30
Shrinath Rao fd1cf3462b fix(e2e): resolve histogram bar chart canvas click timeout (#9628)
## Summary
- Fix TimeoutError in `logsqueries.spec.js` histogram bar chart test
caused by ECharts canvas DOM re-rendering
- Add retry mechanism to `clickBarChartCanvas()` to handle canvas
element detachment
- Add proper assertions using page object pattern

## Changes
- **logsPage.js**: Added retry mechanism (3 attempts) with network idle
wait and stabilization delay
- **logsPage.js**: Added `expectBarChartCanvasVisible()` assertion
method
- **logsqueries.spec.js**: Ensure histogram toggle is ON before test
- **logsqueries.spec.js**: Use `waitForLoadState('networkidle')` for
reliability
- **logsqueries.spec.js**: Add visibility assertions before clicking
canvas

## Test plan
- [x] Test passes locally
- [x] Test passes on repeat runs (verified with `--repeat-each=2`)
- [x] Sentinel code quality audit passed
2025-12-12 23:52:57 +05:30
sktrpathiandsai nikhil kethe e52d000217 feat: add incident correlation system (#9507)
## Summary

Introduces comprehensive incident management system to reduce alert
fatigue through intelligent correlation and AI-powered root cause
analysis.

**Design at:**
https://github.com/openobserve/designs/tree/main/alert-correlation

---

## Incident Correlation

**3-Tier Correlation Priority:**
1. **Trace-based**: Groups alerts from same distributed trace
(cross-service)
2. **Service Discovery**: Uses semantic service matching with
normalization
3. **Dimension-based**: Blake3 hash from stable alert dimensions
(fallback)

**Features:**
- Automatic alert grouping into incidents
- Real-time incident status tracking
(open/acknowledged/resolved/suppressed)
- Topology enrichment via Service Graph integration
- Cross-environment correlation prevention via dimension matching

## Incident Analysis (RCA)

**Automated Analysis:**
- Background job queries open incidents and triggers AI agent
- Periodic analysis via configurable interval
- Results displayed in incident detail view with markdown support

**On-Demand Analysis:**
- Manual trigger via API: `POST /api/v2/{org}/alerts/incidents/{id}/rca`
- Real-time results with loading indicators
- One-click "Analyze" button in UI

## SRE Chat Assistant

**Conversational AI for Alerts:**
- Generic `/api/{org}/agent/chat` endpoint with history support
- Context-aware assistance for alerts and incidents
- Sparkle icons on alert/incident rows for quick access
- Persistent chat history via IndexedDB
- Includes RCA analysis in conversation context

---

## Configuration

```bash
# Incident Management
O2_INCIDENTS_AUTO_RESOLVE_AFTER_MINUTES=-1  # -1=disabled (default), >0=auto-resolve

# RCA Agent Integration
O2_INCIDENTS_RCA_ENABLED=true
O2_INCIDENTS_RCA_AGENT_URL=http://localhost:8000
O2_INCIDENTS_RCA_INTERVAL_SECS=600
```

## API Endpoints

- `GET /api/v2/{org}/alerts/incidents` - List incidents with pagination
- `GET /api/v2/{org}/alerts/incidents/{id}` - Get incident details
- `PATCH /api/v2/{org}/alerts/incidents/{id}` - Update incident status
- `GET /api/v2/{org}/alerts/incidents/stats` - Get incident statistics
- `POST /api/v2/{org}/alerts/incidents/{id}/rca` - Trigger RCA analysis
- `POST /api/{org}/agent/chat` - Generic agent chat endpoint
- `POST /api/{org}/agent/chat/stream` - Streaming agent chat

## Database

- **New tables**: `alert_incidents`, `alert_incident_alerts`
- **Migration**: `m20251204_000001_create_alert_incidents_table`
- **ORM**: SeaORM entities with full CRUD support

## UI Components

- **IncidentList.vue**: Status filtering, pagination, statistics
dashboard
- **IncidentDetailDrawer.vue**: Full incident view with
triggers/alerts/analysis
- **SREChat.vue**: AI assistant panel with markdown rendering
- Incidents tab in AlertList with unified view
- AI sparkle icons for contextual chat access

---

## Enterprise Feature

This is an **enterprise-only** feature with OSS stubs for compilation
compatibility.

- Non-enterprise builds: Handlers return `403 Forbidden`
- Enterprise builds: Full functionality enabled

## Test Plan

- [x] Build passes without `--features enterprise`
- [x] Build passes with `--features enterprise`
- [x] Create alerts that fire and verify incidents are created
- [x] Verify incident list/detail APIs work correctly
- [x] Verify status updates (open → acknowledged → resolved)
- [x] Verify correlation logic (trace-based, service discovery,
dimension-based)
- [x] Verify RCA analysis triggers and displays correctly
- [x] Verify SRE chat integration with alert/incident context

---------

Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
2025-12-12 22:14:18 +05:30
Omkar Kesarkhane 894df5afc1 fix: added missing span startTimeUs and endTimeUs attributes (#9596) 2025-12-12 16:57:26 +05:30
Shrinath Rao 1acd977f31 test: add share link E2E tests for logs page (#9619)
## Summary
- Add 10 comprehensive E2E tests for the share link feature on the logs
page
- Add clipboard permissions to playwright config for share link
functionality
- Add share link page object methods to logsPage.js with Firefox
compatibility fixes

## Test Coverage
| Priority | Tests | Coverage |
|----------|-------|----------|
| P0 (Smoke) | 2 | Button visibility, success notification, stream &
time preservation |
| P1 (Functional) | 4 | SQL mode, histogram toggle, complete state,
loading state |
| P2 (Edge Cases) | 4 | No stream, multiple clicks, SQL query,
redirect/org/consistency |

## Changes
- `tests/ui-testing/playwright-tests/Logs/shareLink.spec.js` - New test
file with 10 tests
- `tests/ui-testing/playwright.config.js` - Added clipboard permissions
- `tests/ui-testing/pages/logsPages/logsPage.js` - Added share link
methods and Firefox fixes

## Test Plan
- [x] All 10 tests pass locally (1.5 minutes runtime with parallel
execution)
- [ ] Tests pass in CI pipeline
2025-12-12 15:44:57 +05:30
Sai Nikhil 23a42f7c6c fix: skip the reordering if colOrder is empty (#9534)
This PR fixes the issue that if colOrder is empty in firefox it was
making the array rotate
2025-12-12 14:41:01 +05:30
Bhargav 66962c7d32 feat: updated rum packages to 0.3.0 (#9588)
Design at : "rum" folder
2025-12-12 13:18:42 +05:30
Sai Nikhil 0625bea035 fix: should show expired at status column in about section (#9585) 2025-12-12 11:28:38 +05:30
Shrinath Rao e945212449 test: added cleanup patterns for streams (#9579) 2025-12-12 06:45:15 +05:30