Commit Graph
217 Commits
Author SHA1 Message Date
Hengfei Yang 14975ace3a feat: add tls for grpc (#5247) 2024-12-04 17:59:54 +08:00
Hengfei Yang 5c1f4721bd feat: add option for NATS deliver policy (#5225) 2024-12-03 17:14:16 +08:00
Hengfei Yang ac35e431d6 fix: no need to create tantivy index if the data is empty (#5202) 2024-12-02 22:38:23 +08:00
Hengfei Yang 9831f26021 feat: add custom tokenizer (#5177) 2024-11-29 11:32:04 +08:00
Patrick Sullivan 46cce3de59 feat: JSON-indpendent hashing of dashboard models (#5133)
The previous mechanism for generating hashes for dashboard models
depended on hashing the JSON representation of the dashboard that was
stored in the `meta` table.

As part of the migration of dashboards out of the `meta` table and into
a dedicated `dashboards` table, this ☝️ presented some problems:

Specifically when we want to translate from the Dashboard ORM model to a
`core::meta::dashboards::Dashboard` model, we need to generate the hash
at the time of translation since `hash` is a field on
`core::meta::dashboards::Dashboard`. We can't simply generate a hash
from the JSON stored in the `dashboards.data` column because this JSON
no longer contains fields for `title`, `owner`, `description`, and
`role`. Those fields are now stored in DB columns, and changes to those
columns in the DB columns would *not* result in changes to the hash on
the JSON blob.

Therefore, rather than hashing the JSON blob, this PR implements hash
functions on the Rust types for the dashboards. Therefore changes to
fields in those Rust structs will result in changes to the hash values,
but changes to the way in which the data is stored in the DB will not
affect the hash values.

⚠️ Note that this PR is changing the hash function on the dashboard
models, so hashes generated for the same model before and after this
deployment will not be the same. My understanding is that this shouldn't
be an issue since hashes are just used as a way of checking on the UI if
the dashboard model has been updated to avoid overwriting the changes of
another user. I believe that this change to the dashboard function might
just have the effect (around the time of deployment) where it would
appear to the UI that the dashboard has been updated when, in fact, it
has not.

https://github.com/openobserve/o2-enterprise/actions/runs/11979723563

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

- **New Features**
- Introduced a new type alias `OrdF64` for enhanced precision in
floating-point operations.
- Added the `Hash` trait to multiple dashboard-related structs and
enums, enabling their use in hash-based collections.

- **Bug Fixes**
- Improved error handling and assertion clarity in API testing for
folder and dashboard operations.

- **Chores**
- Standardized hashing mechanism for dashboard objects in database
operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-25 10:23:38 -06:00
Hengfei Yang d6487eb9fe ci: update rust version (#5143) 2024-11-25 19:20:07 +08:00
Hengfei Yang 842edaa587 feat: implement preload for tantivy (#5130) 2024-11-23 09:34:01 +08:00
Patrick SullivanandTaiming Liu a8647d3bbe feat: move dashboards module to config crate (part 1/2 of feature 5068) (#5113)
This is the first PR for #5068 .

We need to move `dashboards` into the `config` crate so that DB access
functions in the `infra` crate can return types defined in the
`dashboards` module.

When the `dashboards` module is in the `openobserve` crate we cannot use
them in the `infra` crate since that would introduce a circular
dependency.

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

## Release Notes

- **New Features**
- Introduced a new function to move dashboards, enhancing dashboard
management capabilities.
- Added a new `SendReport` trait for improved report handling and
modularity.
- Enhanced error handling across various dashboard and report management
functions.

- **Improvements**
- Updated import paths for better clarity and organization, particularly
for dashboard-related modules.
- Improved timestamp handling for alerts to ensure accurate tracking of
updates.
- Enhanced OpenAPI documentation to reflect updated schema references
for dashboards.
	- Expanded development dependencies to support improved functionality.
- Enhanced the logic for handling report triggers based on frequency
types.

- **Bug Fixes**
- Refined error handling in dashboard creation and deletion functions to
provide clearer responses.
- Standardized error handling across report management functions for
consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
2024-11-22 13:23:40 -06:00
Subhra264 fed3efa27c fix: update chromiumoxide (#5118) 2024-11-22 11:32:53 +08:00
Patrick Sullivan 8bf6cd4b47 feat: migration to new folder table (part 3/3 of feature 5069) (#5100)
#5069 

**Description**
- Introduces migrations to 
    1. Create a new `folder` table
    2. Transform folder records from `meta` table into `folder` table
    3. Delete folder records from `meta` table
- Updates folder and dashboard service logic to use the new `folder`
table rather than the `meta` table

**Prior steps**
Before this PR is merged, two others must be merged first
1. https://github.com/openobserve/openobserve/pull/5095
2. https://github.com/openobserve/openobserve/pull/5096
After these other PRs are merged this PR will be updated to merge into
`main` rather than into `ps/5069/move-folder-2`.

**Next steps**
Feature #5069 will be complete with this PR.
This will open us up to starting on feature #5068.

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


- **New Features**
- Introduced new folder management functionalities, including creating,
updating, listing, and deleting folders.
- Added support for error handling improvements in dashboard and folder
operations.
- Implemented a new README for SeaORM entities detailing usage and
generation instructions.

- **Bug Fixes**
- Enhanced error handling in various functions to ensure appropriate
responses based on success or failure.

- **Documentation**
	- Added documentation for SeaORM entities and their generation process.

- **Refactor**
- Streamlined folder and dashboard management functions for better
clarity and maintainability.
- Updated API structure for folder-related endpoints to improve clarity
and response handling.
	- Improved error handling strategy across multiple service functions.
- Enhanced database interaction methods for folders and dashboards,
promoting modularity and consistency.
- Modified initialization workflow to ensure database schema updates on
application start.
	- Simplified error handling in folder management service functions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-20 16:18:04 -06:00
Taiming Liu 62b08166ac feat: self-report for both usage and errors (#5053)
This PR creates a general `self_reporting` module to be used internally
for both Usage and Error reporting
- channel-based queues to receive ReportingData (Usage or Error) and
ingest buffed data in batch determined by either `batch_size` or
`timeout`
- General `Error` data structure that can be extended to work with
different kinds of error types throughout the system
- Single interface, `publish_error()` can be used once Error type is
defined
- Removed usage gRPC ingestion service previously used only for
ingesting Usage data. Instead, using the general internal gRPC ingestion
service
2024-11-19 12:45:43 -08:00
Hengfei Yang d8f073db69 feat: add tantivy mmap search (#5098) 2024-11-19 18:10:47 +08:00
Huaijin f99d45d2ef chore: upgrade datafusion to v43 (#5090) 2024-11-18 18:02:12 +08:00
Hengfei Yang e3977e760d fix: clean the session data after merge files (#5045) 2024-11-15 11:56:32 +08:00
Hengfei Yang a56b003ffc feat: use range request for tantivy inverted index (#5056) 2024-11-14 20:53:59 +08:00
udev ec23784edc feat: Integrate tantivy as an inverted index substitute (#4733) 2024-11-12 13:47:33 +08:00
Hengfei Yang e3288fae1d feat: improve replay wal to avoid OOM (#5021) 2024-11-08 19:15:39 +08:00
Hengfei Yang 9e7abd5b05 fix: lower case stream name (#4987)
fixed #4986 #4979
2024-11-04 07:09:38 -08:00
Hengfei Yang 74f47d21b5 fix: file list query (#4969)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced a garbage collection mechanism for the local cache,
enhancing resource management.
- **Improvements**
- Enhanced error handling during configuration initialization for better
debugging.
	- Updated time calculations to improve accuracy and consistency.
- **Dependency Updates**
- Updated versions of key dependencies to leverage new features and
fixes.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-11-01 07:37:18 -07:00
0ebaf21f33 feat: Pipeline integration v2 (#4732)
This PR implements the new design of **Pipeline** introduced by #4432 

---

**2 types of pipelines differentiates by the source** 

Type I: **Realtime**
- source is a stream (Logs, Metrics, & Traces)
- takes effect when the source stream is being ingested

Type II: **Scheduled** (aka DerivedSteram)
- source is a SQL query
- takes effect based on the given schedule

The new pipeline is represented as a graph consists of different types
of Nodes that are connected by edges.
**Pipeline Data Model**
```rs
pub struct Pipeline {
    pub id: String,
    pub version: i32,
    pub enabled: bool,
    pub org: String,
    pub name: String,
    pub description: String,
    pub source: PipelineSource,
    pub nodes: Vec<Node>,
    pub edges: Vec<Edge>,
}
```
**4 types of node**
I. StreamNode: either used for source node of realtime pipeline or for
destination nodes
II. QueryNode: used for source node of scheduled pipeline
III. FunctionNode: used for executing vrl functions
IV. ConditionNode: used for checking routing conditions

Rules applied to validating a pipeline when it's created:
1. non-empty nodes list
2. non-empty edges list
3. 1st node in nodes list is either StreamNode or QueryNode
4. non-empty `conditions` in all ConditionNode nodes in nodes list
5. all leaf nodes are of type StreamNode
6. In the same branch, unchecked `after_flattened` FunctionNode can't
follow checked
   `after_flattened` checked FunctionNode

Pipeline execution is implemented with the struct `ExecutablePipeline`,
a ready-execute pipeline object cached in memory based on the Pipeline
objects modified on the UI side.
`ExecutablePipeline` object
- builds the relationships among all the nodes based on the edges
- topologically sorts the nodes based on the level to determine which
node to process first
- registers all the vrl function node once

`ExecutablePipeline` object processes ingested records in batch.
Starting from the source node, each connecting edge has a channel
connecting the parent and child node, used for passing the records. This
approach enables batch processing in parallel.

---

**Deprecated Features**
1. previous implementation of pipeline
2. Function x Stream associations
 - Functions can still be added/edited/removed as before
- Needs to create a pipeline in order to apply chosen functions to the
desired stream

The new release when this pr is merged will automatically migrate **old
pipelines** and **Function x Stream associations** to new pipeline
format and can be found in `Stream Pipelines` tab with `Migrated-`
prefix names.
**_Note: Auto generated pipelines are paused by default. Please verify
the pipelines before enabling them_**


Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
Co-authored-by: Bhargav <BJP232004@GMAIL.COM>
2024-10-30 21:53:28 -07:00
Hengfei Yang 3ce0db827e fix: #4927 (#4928) 2024-10-28 20:00:32 +08:00
Hengfei Yang ff5a2cdeb2 fix: change some print to logs (#4926) 2024-10-28 17:02:39 +08:00
Hengfei Yang 87d2bb862a fix: bugs of v0.13.0-rc1 (#4916) 2024-10-26 09:08:09 +08:00
Huaijin 56dcacb513 feat: use seaorm to refactor short_urls (#4862) 2024-10-24 19:59:06 +08:00
Hengfei Yang 71876ab5b2 fix: can't query data in the case with multiple memtable buckets (#4867) 2024-10-22 19:39:04 +08:00
Hengfei Yang b72ac5b8d7 feat: Alerts support SNS destination (#4824) 2024-10-18 20:27:43 +08:00
Yashodhan Joshi a46ad6cea7 feat: add prefix based paritioning for index (#4709) 2024-10-13 19:40:23 +08:00
Huaijin 07b7df6fed fix: upgrade dependencies (#4762) 2024-10-11 18:40:27 +08:00
Loakesh Indiran f69593ba26 feat: short url service (#4697) 2024-10-07 20:03:37 +08:00
Hengfei Yang 309cddaf27 perf: query file_list in parallels by day (#4669) 2024-10-01 23:21:32 +08:00
Ashish Kolhe 35d25d7691 fix: add partial response warning (#4658)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
	- Enhanced query handling with restrictions based on stream settings.
	- Improved response messaging to indicate partial data availability.

- **Bug Fixes**
- Adjusted query start time when exceeding maximum duration limits,
ensuring compliance with stream settings.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-27 15:41:19 +05:30
Hengfei Yang 9a1c7eedf4 feat: add without connection pool mode for router (#4609) 2024-09-25 23:43:54 +08:00
John Vandenberg d0079bb9bf docs: Fix typos (#4492) 2024-09-22 17:57:47 +08:00
Hengfei Yang d1ed457369 feat: new search engine (#4182) 2024-09-20 15:10:54 +08:00
Yashodhan Joshi 8d5ebbb3c8 feat: optimise file list querying for better search perf (#4518) 2024-09-19 22:45:33 +08:00
Yashodhan Joshi d45ac8f9ad fix: unify the trace ingestion handling (#4435) 2024-09-05 13:33:15 +08:00
Hengfei Yang bb4881c99c feat: add datafusion json functions (#4321) 2024-09-04 11:30:24 +08:00
Taiming Liu 7f75a4d6db feat: use FST for inverted indexing (#4270) 2024-09-02 22:39:44 +08:00
Hengfei Yang 3a079ec06d feat: upgrade to datafusion 41 (#4180) 2024-08-12 13:07:55 +08:00
df2488fa44 feat: optimize sql to plan execution (#4100)
Now we use sql to plan to execute the query. 

we split the PhysicalPlan to two stage:
1. Partial plan, it can be distributed will run on all the nodes.
2. Final plan, it can't be distributed will run on the leader querier
and merge the result.

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


- **New Features**
- Updated to version 0.10.9, introducing enhancements and new
dependencies for improved data processing functionalities.
- Added new Protocol Buffers schemas to define structures for cluster
management and data processing frameworks, enhancing integration
capabilities.

- **Bug Fixes**
  - Improved error handling in configuration to prevent runtime panics.
- Enhanced logic in caching mechanisms for more reliable query
responses.

- **Documentation**
- Added module declarations to improve organization and clarity within
the codebase.

- **Refactor**
- Streamlined execution plans and SQL processing for better performance
and maintainability.

- **Tests**
- Introduced new functions for log ingestion in test suites to enhance
reliability and coverage.

- **Style**
- Made formatting adjustments across various files to improve
readability and consistency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Neha P <neha@openobserve.ai>
Co-authored-by: oasisk <ashish.j.kolhe@gmail.com>
2024-08-05 18:38:35 +08:00
Ashish Kolhe 8ec1be9eaa chore: upgrade vrl version (#4105)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit


- **New Features**
	- Updated critical dependencies to enhance software capabilities.
- Improved data structure management in StreamTable and Geoip
implementations for better performance and clarity.

- **Bug Fixes**
	- Enhanced efficiency of entry removal in the data persistence process.

- **Chores**
- Routine updates to external package versions for improved
functionality and security.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-05 09:29:01 +05:30
Hengfei Yang 766d5a0244 fix: search partition with order by time asc (#4009) 2024-07-18 23:27:07 +08:00
Hengfei Yang 99970f7d0c feat: use cache for value API (#3997)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
	- Improved caching behavior and response processing in search requests.
- Enhanced error handling and response generation for better user
experience.

- **Tests**
- Disabled specific UI interaction in Playwright tests to prevent test
failures.

- **Chores**
	- Updated configuration defaults to improve clarity and efficiency.
	- Made internal constants publicly accessible for broader usage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-18 08:09:12 +05:30
Hengfei Yang effdc28b3f ci: bump datafusion to 40 (#3968) 2024-07-13 20:16:18 +08:00
Hengfei Yang 274a4e3ff1 fix: invalid peer certificate: UnknownIssuer for report traces (#3949) 2024-07-10 20:33:44 +08:00
Hengfei Yang 46a5af14fe feat: secondary index (#3870) 2024-07-10 15:08:07 +08:00
dependabot[bot] a5960b8226 chore(deps): bump zerovec-derive from 0.10.2 to 0.10.3 (#3936) 2024-07-10 12:17:27 +08:00
dependabot[bot] 3129a58e5a chore(deps): bump zerovec from 0.10.2 to 0.10.4 (#3927) 2024-07-09 12:16:43 +08:00
Ashish Kolhe 45dce09ff3 fix: query result cache v2 (#3895)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Added new fields `is_descending` and `limit` to query responses for
enhanced sorting and pagination.

- **Improvements**
- Enhanced logging and tracing for better query time tracking and
debugging.
- Streamlined span handling for more efficient tracing and
instrumentation.

- **Bug Fixes**
- Fixed validation for `result_cache_enabled` configuration to prevent
cache-related errors.
  - Improved accuracy in cache limit handling in query responses.

- **Chores**
- Updated Rust toolchain version for improved compatibility and
performance.


<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-08 20:33:18 +05:30
Hengfei Yang 03f1b192c2 feat: ugprade rust to 2024-07-07 (#3922) 2024-07-08 20:56:56 +08:00