Yashodhan JoshiandYashodhan Joshi babe3b08fb feat: support path based value extraction in cipher functions (#7483)
### **User description**
cherry-pick of https://github.com/openobserve/openobserve/pull/7482 for
main


___

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


___

### **Description**
- Add JSON path extraction utility

- Extend cipher UDFs with path argument

- Rewrite optimizer to handle paths

- Add tests for path-based ciphers


___

### **Changes diagram**

```mermaid
flowchart LR
  J["get_value_from_path"] --> U["cipher UDFs"]
  U --> O["optimizer rewrite"]
  O --> T["path-based cipher tests"]
```


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>auth_tests.rs</strong><dd><code>Remove `batch_size`
default in tests</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>

src/common/utils/auth_tests.rs

- Remove deprecated `batch_size` default


</details>


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

</tr>
</table></td></tr><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>json.rs</strong><dd><code>Implement JSON path
extraction utility</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/config/src/utils/json.rs

<li>Import <code>itertools</code> for flattening<br> <li> Add
<code>get_value_from_path</code> implementation<br> <li> Handle nested
JSON and wildcard paths<br> <li> Add unit tests for JSON path extraction


</details>


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

</tr>

<tr>
  <td>
    <details>
<summary><strong>cipher.rs</strong><dd><code>Support path argument in
optimizer cipher rewrite</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

src/service/search/datafusion/optimizer/cipher.rs

<li>Require only two args for rewrite checks<br> <li> Update sanity
checks to allow optional path<br> <li> Preserve or default path in
<code>CipherKeyRewrite</code><br> <li> Add tests for path-based cipher
calls


</details>


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

</tr>

<tr>
  <td>
    <details>
<summary><strong>cipher_udf.rs</strong><dd><code>Extend cipher UDFs with
JSON path support</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

src/service/search/datafusion/udf/cipher_udf.rs

<li>Extend UDFs to accept three parameters<br> <li> Validate third
<code>path</code> argument in UDFs<br> <li> Parse JSON and extract value
at <code>path</code><br> <li> Update encryption/decryption logic for
arrays


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7483/files#diff-aca30595e1e899bf83b213e84d91063cc621a8972ce22e67bcf4705af817188f">+175/-19</a></td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>sql.rs</strong><dd><code>Require three arguments in SQL
cipher parser</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/service/search/sql.rs

<li>Update cipher function argument count to three<br> <li> Adjust SQL
parser validation for paths


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7483/files#diff-d9ccf393c53794b0ef2816eef12742c26e23d2788cde27780af7570662aea446">+1/-1</a>&nbsp;
&nbsp; &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>

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
2025-07-09 15:51:32 +05:30
2024-09-25 11:09:26 +08:00
2025-07-04 11:34:23 +08:00
2024-09-22 17:57:47 +08:00
2025-07-02 21:31:31 +08:00
2024-06-10 13:10:01 -07:00
2023-11-26 11:04:37 -08:00
2024-09-22 17:57:47 +08:00
2025-04-06 13:37:17 -07:00

OpenObserve

🚀 10x easier, 🚀 140x lower storage cost, 🚀 high performance, 🚀 petabyte scale - Elasticsearch/Splunk/Datadog alternative for 🚀 (logs, metrics, traces).

Last Commit GitHub Stars GitHub Issues Contributors GitHub Release

OpenObserve (O2 for short) is a cloud-native observability platform built specifically for logs, metrics, traces, analytics, RUM (Real User Monitoring - Performance, Errors, Session Replay) designed to work at petabyte scale.

It is straightforward and easy to operate, in contrast to Elasticsearch, which requires understanding and tuning numerous settings. Get OpenObserve up and running in under 2 minutes.

OpenObserve serves as a seamless replacement for Elasticsearch for users who ingest data using APIs and perform searches. OpenObserve comes with its own user interface, eliminating the need for separate installation.

You can reduce your log storage costs by ~140x compared to Elasticsearch by using OpenObserve. Below, we present the results from pushing logs from our production Kubernetes cluster to both Elasticsearch and OpenObserve using Fluent Bit.

OpenObserve Vs Elasticsearch

🎥 Introduction Video

OpenObserve Introduction

🌟 Features:

  • Logs, Metrics, Traces: Comprehensive support for various data types.
  • OpenTelemetry Support: Full compatibility with OTLP for logs, metrics, and traces.
  • Real User Monitoring (RUM): Includes performance tracking, error logging, and session replay.
  • Dashboards, Reports, Alerts: Features over 18 different chart types for comprehensive data visualization for on-the-fly analysis and reporting along with alerting.
  • Pipelines: Enrich, redact, reduce, normalize data on the fly. Stream processing for logs to metrics and more.
  • Advanced Embedded GUI: Intuitive and user-friendly interface.
  • SQL and PromQL Support: Query logs and traces with SQL, and metrics with SQL and PromQL.
  • Single Binary or HA Installation: Install using a single binary for small deployments or in HA mode for large deployments.
  • Versatile Storage Options: Supports local disk, S3, MinIO, GCS, Azure Blob Storage.
  • High Availability and Clustering: Ensures reliable and scalable performance.
  • Dynamic Schema: Adapts to your data structure seamlessly.
  • Built-in Authentication: Secure and ready to use.
  • Ease of Operation: Designed for simplicity and efficiency.
  • Seamless Upgrades: Hassle-free updates.
  • Multilingual UI: Supports 11 languages, including English, Spanish, German, French, Chinese, and more.

For a full list of features, check the documentation.

⚡️ Quick start

🐳 Docker:

docker run -d \
      --name openobserve \
      -v $PWD/data:/data \
      -p 5080:5080 \
      -e ZO_ROOT_USER_EMAIL="root@example.com" \
      -e ZO_ROOT_USER_PASSWORD="Complexpass#123" \
      public.ecr.aws/zinclabs/openobserve:latest

🐙 Docker Compose:

services:
  openobserve:
    image: public.ecr.aws/zinclabs/openobserve:latest
    restart: unless-stopped
    environment:
      ZO_ROOT_USER_EMAIL: "root@example.com"
      ZO_ROOT_USER_PASSWORD: "Complexpass#123"
    ports:
      - "5080:5080"
    volumes:
      - data:/data
volumes:
  data:

For other ways to quickly install OpenObserve or use OpenObserve cloud, check quickstart documentation.

For installing OpenObserve in HA mode, check HA deployment documentation.

📷 Screenshots

Home

Home

Logs

Logs

Traces (OpenTelemetry)

Trace details page Traces using OpenTelemetry

Golden metrics based on traces Traces golden metrics

Visualizations and Dashboards

Dashboard Dashboard Create panel Map

Front end monitoring

Performance analytics Performance

Session replay Session replay

Error tracking Error tracking

Alerts

Alerts

Streams

Streams

Ingestion

Ingestion

Pipeline

Pipeline Pipeline

Function Function

IAM

SSO (Single Sign On) SSO

RBAC (Role Based Access Control) RBAC

SBOM

Software Bill of Materials for OpenObserve

Rust

SBOM can be found here. You can analyze it using dependency track.

In order to generate the SBOM, you can use the following commands:

Install cargo-cyclonedx:

cargo install cargo-cyclonedx

Generate the SBOM:

cargo-cyclonedx cyclonedx

JavaScript

SBOM can be found here. You can analyze it using dependency track.

In order to generate the SBOM, you can use the following commands:

Install cyclonedx-npm:

npm install --global @cyclonedx/cyclonedx-npm

Generate the SBOM:

cd web
cyclonedx-npm > sbom.json         

⚖️ License

OpenObserve is licensed under the AGPL-3.0 license. For more details, see the LICENSE.

🌍 Community

🔗 Join OpenObserve community on Slack

Slack

Easiest way to get support is to join the Slack channel.

📱 Join OpenObserve community on WeChat

S
Description
Open source observability platform for logs, metrics, traces, RUM (web, android, ios), Session replay, pipelines, SLO and LLM observability. A sophisticated, simple and highly performant alternative to Datadog, Splunk, and Elasticsearch with 140x lower storage costs and single binary deployment.
Readme AGPL-3.0
1 GiB
Languages
TypeScript 40.1%
Rust 29.4%
Vue 16.9%
JavaScript 10.9%
Python 2.3%
Other 0.3%