Commit Graph
374 Commits
Author SHA1 Message Date
Huaijin d7b9cc495c chore: use datafuson proto instead of copy (#12812) 2026-06-22 12:02:05 +00:00
Huaijin be9113c735 fix: limit prune issue (#12758) 2026-06-18 14:13:05 +00:00
Huaijin 5be5a302d3 perf: improve approx_distinct performance (#12714)
- close https://github.com/openobserve/o2-enterprise/issues/1862

## todo
- [x] fix access plan
- [x] use forked datafusion
2026-06-17 03:49:37 +00:00
Huaijin 0831badd02 perf: upgrade datafusion to 54 (#12665)
- [x] ~add sort when to many groups, we can do this, but for now do not
do this~
- [x] remove the unsafe for memory pool
- [x] add approx_distinct improve, already fork, will add in next pr
- [x] fork vortex to add cast fix, and export
`.exclude_schemes([IntDictScheme.id()])`
- [x] ~enable_physical_uncorrelated_scalar_subquery test~
2026-06-16 13:27:26 +00:00
Hengfei Yang 890771e319 perf: keep improve histogram on tantivy (#12693) 2026-06-16 10:31:25 +00:00
Huaijin f548a18de4 refactor: access plan struct improve (#12646) 2026-06-15 12:59:55 +00:00
Hengfei Yang 4c43f00036 perf: keep improve histogram on tantivy (#12640) 2026-06-13 12:29:04 +08:00
Hengfei Yang d996349aa4 feat: rewrite tantivy histogram collectors, support histogram() timezone in optimize rules (#12627)
Design at: #12620

Closes #12620
Fixes #12564

## What

Rewrites both tantivy histogram optimize-rule collectors following the
same approach as the recent `TopNCollector` /
`SingleSegmentDocIdCollector` rewrites, and adds timezone support to
both rules.

- `MultiHistogramCollector` (replaces the aggregation framework for
`SimpleMultiHistogram`)
- `SimpleHistogramCollector` (replaces
`tantivy::collector::HistogramCollector` for `SimpleHistogram`)

### Timezone support (#12564)

`histogram(ts, interval, tz)` rewrites to `date_bin(interval,
to_timestamp_micros(_timestamp + offset), origin)`; the optimizer's
`get_column_name` hit the `BinaryExpr` and silently skipped both rules.
Now:
- the visitors extract the fixed offset from that shape
(`get_timestamp_offset`), so the rules fire with a timezone
- `IndexOptimizeMode::SimpleHistogram` / `SimpleMultiHistogram` carry a
`ts_offset` field (no proto change — histogram modes never cross gRPC,
they're re-derived per node)
- bucket edges are computed in shifted wall-clock space and the
collectors bucket on `_timestamp + ts_offset`, so emitted keys match
`date_bin` exactly when merging with non-tantivy partials

## Testing

- New collector unit tests: dense vs sparse equality, ts_offset
shifting, bounds filtering, missing column / missing breakdown docs,
per-bucket truncation with tie-breaks
- Visitor tests now include real-DataFusion-plan timezone cases
(`'+08:00'` simple, `'-05:30'` multi) asserting the extracted shifted
bounds and offset
- `cargo test -p config` (1936 passed), plus `index_optimizer` /
`search::tantivy` / `tantivy_optimize_exec` suites in the main crate;
clippy clean

- Low cardinality: fast `20%` than main
```
histogram(_timestamp, '1h') AS ts, count(*) FROM default GROUP BY ts ORDER BY ts ASC
```
- Low cardinality: fast `30%` than main
```
histgoram(_timestamp, '1h') AS ts, breakdown, count(*) FROM default GROUP BY ts, breakdown ORDER BY ts ASC
```
- High cardinality: faster `5x` than main
```
histgoram(_timestamp, '1h') AS ts, breakdown, count(*) FROM default GROUP BY ts, breakdown ORDER BY ts ASC
```
2026-06-12 10:34:12 +00:00
Hengfei Yang 9c82beeeed fix: OTLP/JSON metrics silently dropping histograms and int values (#12615)
Close #12345

## Problem

OTLP histogram metrics sent over HTTP/JSON (e.g. otel-collector with
`encoding: json`) created streams but stored 0 events, with no
`_count`/`_sum`/`_bucket` streams. Int-valued counters/gauges were
silently recorded as 0. The protobuf path was unaffected, which is why
this only surfaced for collectors explicitly configured with JSON
encoding.

## Root cause

`otlp_json` deserializes the body directly into opentelemetry-proto's
serde-derived types, which only partially implement the proto3 JSON
mapping (64-bit integers encoded as strings, enums by name, zero/empty
fields omitted). `Metric.data` is a flattened `Option` oneof, and serde
converts any inner deserialization error of a flattened `Option` into
`None` instead of failing — so the whole metric silently became `data:
None`, while the stream itself had already been created by the schema
setup. Same mechanism on `NumberDataPoint.value` turned string `asInt`
values into 0.

## Changes

- Upgrade opentelemetry stack 0.31 → 0.32, which fixes string-encoded
u64 handling for plain histograms and summaries upstream.
- Add `otlp_json_compat` normalizer for the gaps still present in 0.32
(each verified empirically, with unit tests):
  - string `asInt` values on data points and exemplars
  - `aggregationTemporality` as enum name
  - `Exemplar`'s value oneof is not flattened in 0.32
- missing `serde(default)` on
`ExponentialHistogramDataPoint`/`Buckets`/`ValueAtQuantile`/`Exemplar`,
which rejected omitted zero/empty fields
- Count and log metrics whose data oneof failed to decode
(`partial_success.rejected_data_points`) instead of silently skipping
them, and stop overwriting specific partial-success error messages with
the generic retention message.
- Adapt to OTLP 0.32 API additions (`KeyValue.key_strindex`,
`AnyValue::StringValueStrindex`).
- Upgrade workspace reqwest 0.12 → 0.13, required because
opentelemetry-http 0.32 only implements `HttpClient` for reqwest 0.13
(`rustls` feature replaces `rustls-tls-native-roots` via the platform
verifier; `json`/`query`/`form` are now explicit features). The
`segment` crate is pinned to reqwest 0.12, so `TELEMETRY_CLIENT` moved
into `telemetry.rs` as a plain `reqwest::Client` that posts the Track
message itself, replicating `segment::HttpClient::send`.
- Remove the unused pyroscope profiling integration (optional feature,
dependencies, agent setup, `ZO_PROF_PYROSCOPE_*` config).

## Verification

- 10 unit tests in `otlp_json_compat` covering the full payload matrix
(collector-style string integers, enum names, omitted zero fields,
exemplars with and without trace context, already-normalized payloads,
malformed input).
- End-to-end: posted the issue's collector-style JSON payload to
`/api/default/v1/metrics` — `_bucket` (3 events, correct cumulative
counts with exemplars attached), `_count`, `_sum` populated for
histogram and exponential histogram, summary quantiles stored, `asInt`
counter stored as 42 instead of 0.
- `cargo clippy -- -D warnings` clean; lib test failures are
pre-existing local-environment issues that reproduce identically on
main.
2026-06-12 04:58:19 +00:00
Harsh Mahajan c260d9162d fix: changing vendored ui-swagger (#12506) 2026-06-08 10:02:20 +00:00
Hengfei Yang 3e865a3e6a ci: update rust (#12394) 2026-06-02 03:58:01 +00:00
Don Kendall 75df625e06 fix: clear Security audit (lettre CVE, rustls-pemfile migration, core2 ignore) (#11832) 2026-05-31 08:55:53 +08:00
Hengfei Yang 87e7441580 perf: add get_ranges for local cache (#12194)
impl #12195

- [x] perf: add get_ranges for local cache
- [x] perf: add compact fast 
- [x] feat: add CLI reset index-updated-at
- [x] ci: bump tantivy version to 2.6
2026-05-25 08:26:44 +00:00
Hengfei Yang 45c8fb6838 fix: object store bulk delete issue (#12116)
fixed #12105
2026-05-22 10:38:51 +00:00
Hengfei Yang f2cd026f52 fix: file list migration url (#11883) 2026-05-18 06:33:42 +00:00
Harsh Mahajan 9f00716db0 fix: security_audit upgrade (#11861) 2026-05-15 11:56:44 +00:00
Hengfei Yang 17a4b4dc23 fix: reset file-list-jobs with stream (#11854)
Usage:
```
  openobserve reset -c file-list-jobs -t 1700000000000000
  openobserve reset -c file-list-jobs -s default/logs/app
  openobserve reset -c file-list-jobs -t 1700000000000000 -s default/logs/app
```
2026-05-15 10:24:25 +00:00
Hengfei Yang 75bda12998 chore: change default max size to 2GB for compactor (#11629) 2026-05-06 23:07:25 +08:00
dependabot[bot] e6c164ba07 chore(deps): bump rand from 0.10.0 to 0.10.1 (#11260) 2026-04-23 08:23:02 +08:00
Hengfei Yang 77d376efa2 fix: improve real ip logic (#11378) 2026-04-22 22:56:05 +08:00
Huaijin 493dac7433 chore: update datafusion to 53.1.0 (#11310) 2026-04-17 12:03:02 +00:00
Hengfei Yang 69fd00f0c5 fix: implement AES-256-SIV encryption and decryption utilities (#11286) 2026-04-16 19:15:56 +08:00
Hengfei Yang b266560838 feat: support custom AI tools (#11270) 2026-04-15 20:11:35 +08:00
漂流 fbf7283ffc chore: use std instead of once_cell (#11081) 2026-04-06 16:27:16 +08:00
HuaijinandHengfei Yang ada8b3763f chore: upgrade datafusion to 53 (#11093)
- [x] check if still need `CoalesceBatchesExec`
- [x] check object_store upgrade

---------

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2026-04-06 06:06:51 +00:00
udev 9525aad6fe fix: grpc use native/webpki trust store (#11083) 2026-03-31 11:28:53 +05:30
477ec39db2 feat: add support for sourcemaps for RUM (#10259)
This ads support for sourcemaps in RUM

Design at :
https://github.com/openobserve/designs/blob/main/application-monitoring/rum/sourcemap-be.md

---------

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: Yashodhan Joshi <yjdoc2@gmail.com>
Co-authored-by: sai nikhil kethe <nikhil@openobserve.ai>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-03-24 21:18:06 +05:30
Huaijin 2923938b95 chore: upgrade datafusion to 52.4.0 (#10995) 2026-03-23 16:47:21 +08:00
Huaijin b3a9b3c14f perf: preserve fetch when rewriter FilterExec (#10971) 2026-03-21 20:15:35 +08:00
Hengfei Yang b50de58a97 refactor: update schema field naming and enhance metadata extraction methods (#10945) 2026-03-18 09:01:31 +08:00
Hengfei Yang 53668c8c1a chore: update dependencies in Cargo files (#10929) 2026-03-17 11:14:14 +05:30
dependabot[bot] 283a5f3041 chore(deps): bump lz4_flex from 0.11.5 to 0.11.6 (#10928) 2026-03-17 09:08:02 +08:00
Hengfei Yang dafa382abb fix: handle serde_json arbitrary_precision number in VRL parse_json (#10920) 2026-03-16 21:07:35 +08:00
Hengfei Yang 5d4a909813 fix: create trigger schema (#10896) 2026-03-13 22:36:41 +08:00
Sai Nikhil d2861433fa fix: search inspector UI (#10749) 2026-03-13 09:57:29 +08:00
Huaijin 8212ca6f8e refactor: split the tantivy out of core (#10825)
perpare for tantivy benchmark
2026-03-10 17:16:45 +08:00
Hengfei Yang 0b81010cf1 ci: update mimalloc version (#10756) 2026-03-05 16:10:11 +08:00
Hengfei Yang 020c41e913 fix: WAL runtime worker configuration (#10753) 2026-03-05 11:55:24 +08:00
Hengfei Yang 289d806598 feat: add support for dynamic tracing resource attributes (#10731) 2026-03-04 20:29:18 +08:00
Harsh MahajanandHarsh Mahajan ef369e595d chore: upgrading packaages (only non-core packages) (#10726)
Co-authored-by: Harsh Mahajan <undefined@users.noreply.github.com>
2026-03-04 05:45:36 +05:30
Huaijin 9944f02031 chore: upgrade datafusion to 52.2.0 and vortex to 0.60.0 (#10706) 2026-03-02 16:06:21 +08:00
dependabot[bot] d79703326b chore(deps): bump keccak from 0.1.5 to 0.1.6 (#10591) 2026-02-23 11:33:20 +08:00
Huaijin a810617abc chore: refacotr vortex related code (#10506) 2026-02-13 16:42:40 +08:00
Huaijin 016d1d777c feat: support vortex as option file format (#10491) 2026-02-12 19:16:51 +08:00
udev 9b11d0346a fix: JWT dependency (#10437)
### **PR Type**
Bug fix, Dependencies


___

### **Description**
- Enable `aws_lc_rs` for `jsonwebtoken`

- Fix JWT crypto backend compatibility


___

### Diagram Walkthrough


```mermaid
flowchart LR
  dep["`jsonwebtoken` dependency"] 
  feat["Enable `aws_lc_rs` feature"]
  jwt["JWT signing/verification compatibility"]
  dep -- "adds feature flag" --> feat
  feat -- "ensures backend support" --> jwt
```



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

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>Cargo.toml</strong><dd><code>Enable AWS LC backend for
`jsonwebtoken`</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

Cargo.toml

<ul><li>Switch <code>jsonwebtoken</code> to feature-enabled
dependency<br> <li> Enable <code>aws_lc_rs</code> feature for
<code>jsonwebtoken</code> v10.3</ul>


</details>


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

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

</details>

___
2026-02-10 10:58:20 +05:30
Huaijin b315f4ca08 feat: dag graph for llm traces (#10388) 2026-02-06 16:46:44 +08:00
Harsh Mahajan e6d5b6eed5 fix: ParserError on streams with : in name (#10394) 2026-02-06 12:46:49 +08:00
Harsh Mahajan d0b0614919 fix: dependency upgrades in Cargo.toml and Cargo.lock. (#10253) 2026-02-06 11:45:24 +08:00
Huaijin 21155591fd feat: map otel field to openobserve field (#10213) 2026-02-04 15:30:55 +08:00
Harsh Mahajan 97056c0777 fix: cargo audit, package upgrade (#10363) 2026-02-04 09:36:28 +08:00