Commit Graph
769 Commits
Author SHA1 Message Date
Subhra264 89a2959869 fix: role and group names should be formatted using regex (#7224)
### **User description**
Currently role names and groups names are getting lowercased when
creating them (as part of the org revamp changes). This PR uses standard
format_role_name function to follow a standard role and group name
format.


___

### **PR Type**
Enhancement


___

### **Description**
- Introduce reusable name-formatting function

- Enforce regex formatting for roles and groups

- Update HTTP handlers to apply formatting

- Standardize success responses for role/group


___



### **Changes walkthrough** 📝
<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>jwt.rs</strong><dd><code>Extract and centralize name
formatting</code>&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/auth/jwt.rs

<li>Extract regex-based formatting into helper<br> <li> Change
<code>format_role_name</code> to accept <code>&str</code><br> <li> Add
public <code>format_role_name_only</code> function<br> <li> Delegate
formatting to new helper function


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7224/files#diff-232cab74f4cbf135af424744272e17732fbda8ac005d33c0acb4597e65479d02">+9/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>fga.rs</strong><dd><code>Apply standardized formatting
in handlers</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

src/handler/http/request/authz/fga.rs

<li>Import <code>format_role_name_only</code> helper<br> <li> Replace
lowercase trim with regex formatting<br> <li> Update handler logic to
use new helper<br> <li> Standardize response messages and payloads


</details>


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

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

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-06-18 16:02:52 +05:30
Loakesh IndiranandHengfei Yang 600c0d3b7e feat: aggregation cache (#6923)
Cache Intermediate record batches for aggregate sql queries

## TODO

- [ ] Add in memory cache file index
- [ ] Modify exiting delete stream results api to also delete
`aggregations` cache
- [ ] use bounded Chanel for `CACHE_QUEUE` and and an env for queue size

---------

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2025-06-17 21:08:48 +05:30
Patrick SullivanandSubhradeep Chakraborty edf8b7b069 feat: Migrate reports from meta into reports table (#5946)
Migrates reports out of the `meta` table into new `reports` and
`report_dashboards` tables.
- Creates a new `reports` table
- Creates a new `report_dashboards` junction/join table that establishes
a many-to-many relation between reports and dashboards.
- Transforms data from the `meta` table into the new tables
- Creates a new `"default"` report folder for any organization that has
a report.
- Creates a new `reports` record for each report in the `meta` table.
- Creates a new `report_dashboards` record to link each report to each
of the dashboards it references.
- Previously, in the `meta` table, reports referenced dashboards by
folder ID and dashboard ID that was stored in JSON. This meant that
moving a dashboard would cause the references to that dashboard in
different reports to break. Since the `report_dashboards` table links
reports and dashboards using foreign keys to their KSUIDs, moving a
dashboard can no longer invalidate this reference.
- When `dashboards` or `reports` records are deleted, those deletions
are cascaded to the `report_dashboards` table.
- Updates the existing reports service layer logic to use the new
`reports` table rather than the `meta` table.
- Adds logic so that when a dashboard is deleted, any report which
referenced it is deleted as well.
- ⚠️ This PR removes the reports cache. I'm not sure if this is actually
something that will be OK or if doing this would create problems.
- Rather than trying to update the existing reports cache logic to work
with the other changes introduced in this PR, I thought that it might be
easier to remove the cache and then add it back later in an updated form
which uses the KSUIDs as cache keys rather than the report names since
eventually we will want to make it possible to have reports with
duplicate names.
- If we do actually need the report cache, I can add it back to this PR
and make the necessary updates so that it continues functioning.

---------

Co-authored-by: Subhradeep Chakraborty <chakrabortysubhradeep556@gmail.com>
2025-06-16 16:25:29 +05:30
Hengfei Yang 7f2857d705 ci: enable symbol for dev image (#7177) 2025-06-14 23:39:46 +08:00
Hengfei Yang 42541ad53a fix: add memory circuit breaker for ingester (#7171)
### **User description**
This PR add circuit breaker for ingester to protect OOM. To enable this
feature we need to config:

```
ZO_MEMORY_CIRCUIT_BREAKER_ENABLED=true
ZO_MEMORY_CIRCUIT_BREAKER_RATIO=90
```

If the system memory usage over `90%` , we will return `503` with error
`MemoryCircuitBreakerError`.

Default is `false`, disabled.


___

### **PR Type**
Enhancement


___

### **Description**
- Add memory circuit breaker config and defaults

- Implement breaker check in ingester writer logic

- Integrate ingestion resource check across services

- Introduce new error variants for circuit breaker


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Configuration
changes</strong></td><td><details><summary>2 files</summary><table>
<tr>
<td><strong>config.rs</strong><dd><code>Define memory circuit breaker
configuration defaults</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7171/files#diff-9aeee4a74c0520daa40f9b81c7016f5b6b3254375b968dd7598e745630980d62">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>loki.proto</strong><dd><code>Add Java proto generation
options</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></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7171/files#diff-c6860d35cb793f55cbf91f6dc9e9366bf45a42c3b6385c6c07e813f22d18ccfb">+10/-14</a>&nbsp;
</td>

</tr>
</table></details></td></tr><tr><td><strong>Error
handling</strong></td><td><details><summary>3 files</summary><table>
<tr>
<td><strong>mod.rs</strong><dd><code>Add IngestionError error
variant</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/7171/files#diff-90c725d0e77a6e7d4bcc130cf5783848a5cf0efdb304b351cd63cacf8775fc36">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>errors.rs</strong><dd><code>Introduce
MemoryCircuitBreakerError variant</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/7171/files#diff-bf45932466265b732f13d0cd9b9cffbaefbe37c5861ace9315449eeca9250713">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>syslog.rs</strong><dd><code>Handle circuit breaker error
logging</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/7171/files#diff-4bc46f36fad79f5df8c42b8a8d5d8c4a70b1320b966bcff3421deeb96a1981fa">+2/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Miscellaneous</strong></td><td><details><summary>2
files</summary><table>
<tr>
<td><strong>lib.rs</strong><dd><code>Export check_memory_circuit_breaker
function</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/7171/files#diff-603267e2f712eeb4bc46fdff981f1fad1f3a9d3b989a7db4b3c0984fc5b1ed43">+4/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>hec.rs</strong><dd><code>Remove pre-ingest resource
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; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7171/files#diff-5434f454898e66d4a982801761a349ac7e6862836e15eefaf643b31d0d2933dd">+1/-9</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Enhancement</strong></td><td><details><summary>12
files</summary><table>
<tr>
<td><strong>writer.rs</strong><dd><code>Implement memory circuit breaker
logic</code>&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/7171/files#diff-d1a9b1542cc2758afe4fa67abd454dd818718f4e1c7570303519af5a58d6301f">+16/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>mod.rs</strong><dd><code>Extend check_ingestion_allowed
signature and call breaker</code></dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7171/files#diff-7c7b5bca85f0ced652965cae66540c96f56dfcca4f4c16b77bf7b45aac203d1b">+9/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>bulk.rs</strong><dd><code>Pass stream type to ingestion
check</code>&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/7171/files#diff-2017dbe9076c78a7e7919ed5c8738729123d630038803cef0ce2c356d6fa2c48">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>ingest.rs</strong><dd><code>Include circuit breaker in log
ingest checks</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/7171/files#diff-e62118e45be183266d39ffa08491f255017954235ff0f3d6937683e314da406f">+3/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>otlp.rs</strong><dd><code>Add breaker check for OTLP
logs</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/7171/files#diff-183498d98b17ddf344cbab4da6b2d9fe89ac81112db51655c142a89023b46ef3">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>json.rs</strong><dd><code>Use unified ingestion check for
metrics</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/7171/files#diff-506987e61095a54e47f7f208dad89f9f1bce595fa6bf1ba8a7d746f2b2ff6c4a">+10/-20</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>otlp.rs</strong><dd><code>Add resource check for metrics
OTLP</code>&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/7171/files#diff-a24391bef75a4678c50724e8b5f305ec0ee8c2c74c68be9d677765de68b5d8dd">+4/-23</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>prom.rs</strong><dd><code>Invoke ingestion check in Prom
remote_write</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/7171/files#diff-c4e9e1d49a2bd0fefe67684b3768c4792be63cebcf727d71a48141f5b5957b8c">+4/-18</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>mod.rs</strong><dd><code>Use new error variant for circuit
breaker</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/7171/files#diff-124b08e44cb8740f8cb0dde3342ccd8c1b3b4e3c6a0edb12c151e060c54a0bd0">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>storage.rs</strong><dd><code>Always apply memory circuit
breaker check</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/7171/files#diff-ab2d867e1e2e3dd8307505c2e130039628a84f8131a9b38cd2e7b4e1c141e094">+2/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>wal.rs</strong><dd><code>Enforce breaker and release files
on error</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/7171/files#diff-48aea52fd870678e577e03f29fc9769920b7f74761b1447242835dbf1b8ac8df">+5/-6</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>mod.rs</strong><dd><code>Add breaker check for traces
ingestion</code>&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/7171/files#diff-66f3b4f5e7927092fd6e57738687a1091b6f316638f7c58f8d7be9addb72bc30">+14/-58</a>&nbsp;
</td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>loki.rs</strong><dd><code>Remove obsolete comment in
StreamAdapter</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/7171/files#diff-519e5b0c03a8916b62712d1c892dab46282acb6c3f9942c2001169a0e2ea2f3c">+0/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Formatting</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>search_stream.rs</strong><dd><code>Reformat long comment
lines for clarity</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/7171/files#diff-b952a89375f2745a0daa273f1bdefc80c22997759a9b17a8fccbc70ae294e8e4">+9/-6</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>write.rs</strong><dd><code>Adjust Writer initializer tuple
unpack</code>&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/7171/files#diff-791f2d9a83e5cd9620a9649156f12988a8cf1846337d6953bfc07bea9a46b71a">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

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

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-06-14 16:25:07 +08:00
Maheep Kumar 529e520df8 feat: TLS support for Syslog TCP Server (#7072) 2025-06-11 11:25:23 +08:00
Yashodhan JoshiandYashodhan Joshi 1785b2b256 test: use multiple dbs (#7084)
This PR adds support for running unit tests with all three - sqlite,
postgres and mysql. This way we cover their code as well.

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-06-10 10:32:00 +05:30
Jaydeep Maddipati b3120ee7e1 feat: loki ingest api closes #7034 (#7075) 2025-06-10 11:02:43 +08:00
Subhra264andTaiming Liu 0580c04870 fix: decode base64 auth_token cookie (#7085)
After sso login, we return the access_token and refresh_token as base64
encoded string through cookies. But when handling the `/dex_refresh`
endpoint, we don't decode the cookie, hence the dex_refresh does not
really work.

Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
2025-06-09 06:34:32 -07:00
Ashish Kolhe a13eef865b fix: ai tool changes (#7055) 2025-06-06 20:49:43 +05:30
Yashodhan JoshiandYashodhan Joshi 54a3fda236 feat: support hec format for ingestion (#7043)
closes #6996 

This adds support for HEC data format in ingestion via `/org_id/_hec`
api path. See the issue for more details.

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-06-06 20:00:20 +05:30
udevandomkark06 2bcae056ac fix: redirect short url (#7026) (#7033)
with this POC we will let FE handle all short url redirections. We keep
the old routes intact for backwards compatibility

---------

---------

Co-authored-by: omkark06 <omkar@zinclabs.io>
2025-06-06 17:33:16 +05:30
Hengfei Yang 0310905787 fix: debug wal file lock issue (#7066)
There are some edge case `wal` file can't be released, then the `wal`
file can't be removed, it stays over 1 day.
2025-06-06 18:17:28 +08:00
Sai Nikhilandoasisk 3c5ae41210 fix: add output format type for external destination(pipeline destination) (#6993)
1.This PR adds the output format to the external destination either json
/ ndjson , bydefault it is json

---------

Co-authored-by: oasisk <ashish.j.kolhe@gmail.com>
2025-06-02 11:59:49 +05:30
Taiming LiuandSubhra264 f18c098bdb chore: porting pipeline fix to main (#6986)
Co-authored-by: Subhra264 <chakrabortysubhradeep556@gmail.com>
2025-06-01 16:14:57 -07:00
Subhra264andsai nikhil kethe 197d4b6252 feat: return ai_enabled boolean in the config api (#6971)
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
2025-05-30 21:18:22 +08:00
Hengfei Yang 34a07e55ab fix: add use_cache for traces latest api (#6970) 2025-05-30 17:23:05 +08:00
Hengfei Yang fa6454267c feat: add search scheduler (#6950)
impl #6948

- [x] When we run query, we get node list and check the node CPU, drop
at most 20% querier nodes.
- [x] When download file, we first try to download from original node(
by consistent hashing), then download from object store.
- [ ] ? should also apply this logic for ingester node ?
- [x] Fixed metrics keep increase issue of DownloadManager
2025-05-28 23:31:57 +08:00
Hengfei Yang 02f29edc3a fix: node list API by router (#6946) 2025-05-28 17:44:23 +08:00
udev b01000f338 fix: handle stream unwrap in AI handler (#6938) 2025-05-27 20:31:08 +05:30
31703cc9d2 feat: o2 AI Agent (#6899)
this PR introduces o2 ai agent with this user able to ask o2 ai about
sql query , vrl query and logs

---------

Co-authored-by: Subhradeep Chakraborty <chakrabortysubhradeep556@gmail.com>
Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
2025-05-27 15:09:19 +05:30
Hengfei Yang b134b6e872 fix: stream stats for super cluster (#6921)
The issue is when we get cluster list we didn't filter the alert querier
cluster then the stats duplicated. The fix in o2 enterprise. this pr
only update some logs.
2025-05-27 15:36:06 +08:00
Ashish Kolhe de5da35d0d feat: add ndjson as output format (#6919) 2025-05-27 08:51:10 +05:30
+2 0d9f47966b feat: Organization revamp (#5579)
Fixes #5131 
Addresses #5408 

### Revamp
- Created a new table to store organizations in the `organizations`
table. Earlier, we never stored organizations in any table, rather we
used to store the organizations in the meta table as part of the `user`
json.
- The users and organization membership relations are now moved to its
own separate tables - `users` and `org_users`.

### New changes

**API changes** -
- `/organizations` - `POST` api to create an org and save it in the meta
table. In non-enterprise version, currently only the root user can
create the org. For enterprise version with rbac enabled, anyone with
`CREATE` access for organizations can create the organization and
becomes an admin. Root user can always create an organization.
- `/{org_id}/rename` - `PUT` api to rename the existing org. Only root
user and the admins of the org can access this API.

The payload for following APIs are changed -
- `POST api/{org_id}/roles` - `{"name":"new_role"}` is changed to
`{"role":"new_role"}
- `POST api/{org_id}/users/{user}` -
`{"role":"viewer","custom_role":["role_name"]}` is the new payload where
`custom_role` is optional and is array of custom roles (only works in
enterprise with rbac enabled) which will be assigned to the user. The
value of `role` can be standard role or as well as any custom role (when
it is custom role, the standard role assigned to the user is decided
based on the enterprise env variable - `O2_DEX_DEFAULT_ROLE`).
- `POST api/{org_id}/users`- the payload -
```
{"email":"user@user.com","role":"viewer","custom_role":["create_org_permission"],"password":"12345678", "first_name": "", "last_name":""}
```

- `PUT api//{org_id}/users/{email_id}` the payload -
```
{"first_name":"Hello","last_name":"j","role":"viewer","isExternal":false,"change_password":false,"password":"","custom_role":["create_org_permission"]}
```


A new ENV variable is introduced - `ZO_CREATE_ORG_THROUGH_INGESTION`
(default `false`) which if true, an org will automatically created when
ingesting data to a new org. If false, user can not create org by
ingesting data to new org, they need to first call the `POST
/organizations` API.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

**New Features**
- Added a `cloud` feature for enhanced organizational management
capabilities.
- Introduced new methods for managing organizational users and
asynchronous message processing.
- Enhanced user invitation and membership features, including improved
role handling.
- Implemented configurable ingestion URL support across various
components.
- Added new functionality for user management and organization handling
in the super cluster architecture.

**Improvements**
- Refined user authentication and authorization processes, including
error handling.
- Updated database schema to support multi-organization architecture.
- Enhanced pagination settings and UI components for better user
experience.
- Improved handling of organization names and user roles in
notifications and alerts.
- Streamlined service account token management with visibility
enhancements.
- Enhanced the `AddUpdateOrganization` component with improved user
input handling and validation.
- Updated the `AppOrganizations` component to dynamically load the
appropriate organization management interface.
- Improved the `ServiceAccountsList` component with updated pagination
options and token handling logic.

**Bug Fixes**
- Resolved issues with user role assignments and organization management
inconsistencies.
- Corrected routing and navigation logic for login and logout processes.
- Addressed various error handling scenarios in user and organization
processes.
- Fixed issues with the visibility of service account options in the
`EditGroup` and `EditRole` components based on the cloud configuration.

**Breaking Changes**
- Significant restructuring of user and organization data models.
- Changes to authentication workflows and configuration handling.
- Removal of certain components related to user and organization
management.
- Updated the logic for determining the ingestion URL across various
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
Co-authored-by: hengfei yang <hengfei.yang@gmail.com>
Co-authored-by: harshiv-7 <harshiv@openobserve.ai>
Co-authored-by: Huaijin <haohuaijin@gmail.com>
Co-authored-by: Zhao.wei <weizhao029@gmail.com>
Co-authored-by: ShyamOOAI <shyam@openobserve.ai>
Co-authored-by: oasisk <ashish.j.kolhe@gmail.com>
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
Co-authored-by: Yashodhan Joshi <yashodhan@openobserve.ai>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-05-25 21:53:55 -07:00
Hengfei Yang 8be4307bd3 fix: add more unit test for time parse (#6898) 2025-05-24 22:05:47 +08:00
Hengfei Yang b058106166 fix: broadcast event use file id (#6891)
- [x] fix: broadcast event use file id
- [x] feat: add metrics for consistent hashing
2025-05-23 16:56:06 +08:00
Hengfei Yang 9c585d73a4 fix: ider init with machine id (#6840) 2025-05-23 16:20:57 +08:00
Hengfei Yang b105a9ef99 fix: move event download to download manager (#6873) 2025-05-22 12:46:58 +08:00
Loakesh Indiran 1ad3f8368e fix: chery-pick fixes (#6853)
- fix: auth for _values_stream (#6849)
- fix: simple distinct sql for http api (#6836)
- feat: add env to enable use_stream_setting for partitions (#6866)

# closes
- https://github.com/openobserve/openobserve/issues/6863

New Env
```
ZO_USE_STREAM_SETTINGS_FOR_PARTITIONS_ENABLED # default false
```
2025-05-21 17:12:52 +05:30
Taiming Liu c8f162eb5a fix: ent build and clippy (#6842) 2025-05-19 15:31:36 -07:00
udev da2a769762 feat: Add HTTP2 Streaming support (#6721) (#6827) 2025-05-20 00:06:05 +08:00
Hengfei Yang ca69ce0118 fix: alert can't query latest data for separate alert query (#6831)
- [x] fix: alert can't query latest data for separate alert query
- [x] feat: add size limit for download from other nodes
- [x] fix: use real time id generator
2025-05-19 19:29:12 +08:00
udev 3f793d9169 fix: Values API get partitions for no count (#6794)
Change the query type to do a dummy aggregation for no count query
2025-05-13 15:25:57 +05:30
Yashodhan JoshiandYashodhan Joshi ff9660fff0 fix: internal error audit (#6768)
This adds the error header to all cases of internal server error so they
show up properly in audit. This is done by one of two approaches -
1. preferably using the `map_error_to_http_response` function , so that
everything goes via the same function
2. directly adding the header where the above function cannot be used
because is is not an error per say like trying to ingest at
non-ingester.

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-05-12 18:32:36 +05:30
udev 9737dc1d20 feat: add condition list for OR operator support in alerts (#6607)
- use list of condition for legacy conditions
- add serde rename to operator struct.
2025-05-11 22:55:04 +05:30
Subhra264andsai nikhil kethe 330cf14ec0 fix: ZO_DEFAULT_MAX_QUERY_RANGE_DAYS env should be returned by streams list api (#6762)
Fixes #6753

---------

Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
2025-05-09 14:22:58 +05:30
Yashodhan Joshi 63804e8680 fix: supercluster scan stats (#6763) 2025-05-09 16:20:18 +08:00
Hengfei Yang 9080833a31 fix: sort the nodes by id (#6693) 2025-05-06 14:31:35 +08:00
Hengfei Yang 2a82d1dec2 fix: multiple object store for search_job & actions (#6716)
Always use first (default) object store account for search_job &
actions.
2025-05-04 19:58:02 +08:00
Hengfei Yang 30eeaf2bd9 feat: impl multiple storage accounts (#6667) 2025-05-04 19:09:25 +08:00
Subhra264 404d34f50d feat: Make Align time optional for alerts/pipelines and reports (#6605) 2025-05-02 14:21:07 +05:30
Subhra264andhengfei yang e06281cd17 fix: scheduler query trace_id should be searchable in traces page (#6694)
Currently, the scheduler trace_ids are not searchable in the traces
page, because they are only used in the logs and not in the
instrumentation. This pr fixes that - so, the scheduler query trace id
(which can be obtained from the `triggers` stream, field name -
`scheduler_trace_id`, the trace_id after the `/` is the scheduler query
trace_id), can be used as `trace_id` to search the trace in the traces
page.

Also, the `grpc::search` and `grpc::search_multi` does not use the
trace_id from the grpc "request" for instrumentation. This pr fixes that
as well.

---------

Co-authored-by: hengfei yang <hengfei.yang@gmail.com>
2025-05-01 13:46:00 +05:30
ByteBaker 0d3e72b74d feat: Merge ingestion logic for logs using OTLP proto SDK (#6673) 2025-04-29 19:31:49 +08:00
Ashish Kolhe 1f47ac2614 fix: base64 encode cookies (#6596)
fixes : [6564](https://github.com/openobserve/openobserve/issues/6564)
2025-04-28 18:08:48 +05:30
Hengfei Yang a283d54632 fix: add retry if download file get size mismatch (#6659)
- [x] fix: add retry if download file get size mismatch
- [x] fix: delete from file_cache index if one file delete from disk
- [x] fix: remove trace_id for file_cache and download, it is noise
- [x] fix: download file other node, add file size mismatch check, and
skip the not found error
2025-04-28 19:51:36 +08:00
Hengfei Yang 8d29b1b324 fix: download multiple files (#6664)
We should extent slice not replace slice for download with streaming.

Testing this feature need to enable ENV:
```
ZO_CACHE_LATEST_FILES_ENABLED = true
ZO_CACHE_LATEST_FILES_DOWNLOAD_FROM_NODE=true
```
2025-04-28 18:02:18 +08:00
Loakesh Indiran e22798e587 fix: values event sql (#6663)
- [x] pass the original request sql to the `can_use_distinct_stream` fn
- [x] fix parsing json `Value` to string
- [x] fix `unwrap` when parsing sql
2025-04-28 14:38:30 +05:30
Zhao.wei b3c0bdd66e feat: impl grpc get files from other nodes (#6632) 2025-04-28 13:25:44 +08:00
e89423ca49 fix: cherry-pick rc7 fixes (#6649)
- [x] fix: `tokio_tungstenite` max msg limit config
- [x] honor user cancel in ui (logs, dashboards) if
`should_client_retry` is `true`, and is in loop.
- [x] fix: `values` event to send `cancel` response if search query
cancelled
- [x] handle `values` event error in ui

---------

Co-authored-by: omkark06 <omkar@zinclabs.io>
Co-authored-by: udev <uddhav@openobserve.ai>
2025-04-25 22:01:31 +05:30
14e014fe38 fix: enrichment table old data should not be used in vrls (#6639)
This pr uses the meta table to store the start_time and end_time of
enrichment table, instead of relying on the stream_stats table which
takes some time to update. When we cache enrichment table for vrls, we
use the above start_time and end_time instead of `BASE_TIMESTAMP`
(because when enrichment table is overridden, deletion of old data
happens in the background and is not realtime, so using `BASE_TIMESTAMP`
included old data)

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
2025-04-25 09:57:02 +05:30