Commit Graph
1055 Commits
Author SHA1 Message Date
Taiming Liu 762b4d5a59 fix: several PromQL functions (#3584)
- fix PromQL functions: irate, topk, bottomk, and histogram_quantile
- perf: remove rayon `par_iter()` and some unnecessary clones

This PR improved compliance coverage from 95.07% to
```bash
================================================================================
General query tweaks:
*  Openobserve is sometimes off by 1ms when parsing floating point start/end timestamps.
*  Openobserve fractional tolerance amount for <agg>_over_time queries
================================================================================
Total: 538 / 548 (98.18%) passed, 0 unsupported
```

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

## Summary by CodeRabbit

- **Bug Fixes**
- Improved label handling and processing in the data evaluation
functions.
- Optimized value processing by removing unnecessary cloning operations.
  - Enhanced accuracy in time difference calculations in rate functions.

- **Performance**
- Streamlined iteration and filtering operations for better performance.
  - Simplified `Engine` instance creation to reduce overhead.

- **Refactor**
- Refined logic in histogram functions to handle empty buckets more
effectively.
- Adjusted control flow in extrapolated rate calculations for better
efficiency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-04 23:24:45 +02:00
Taiming Liu 033a308e1b fix: default for ZO_USAGE_PUBLISH_INTERVAL not loaded (#3679)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Refactor**
- Reformatted the `usage_publish_interval` configuration attribute for
better readability.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-04 11:34:13 -07:00
Hengfei Yang 76efeb5e2a fix: reduce CPU const for merging (#3673) 2024-06-04 21:37:52 +08:00
Subhra264 99eceb4db0 fix: move usage reporting to cron jobs (#3672)
Fixes #3373 

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

- **New Features**
- Improved the handling and publishing of usage data, ensuring more
efficient and timely updates.
  
- **Refactor**
- Streamlined the internal control flow for managing usage data,
enhancing overall system performance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-04 14:46:12 +05:30
Hengfei Yang 2d530ebc0e feat: improve search group resource management (#3666) 2024-06-03 20:47:18 +08:00
Ashish Kolheandktx-abhay 79fe002f60 feat: include search type in search calls (#3648)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced `searchType` attribute across various components to enhance
search functionality.
- Added support for different search event types like `UI`,
`Dashboards`, `Reports`, `Alerts`, `Values`, and `RUM`.

- **Bug Fixes**
- Improved search parameter handling in multiple components and API
calls.

- **Enhancements**
- Updated search-related functions to include `searchType` for more
precise search results.
- Enhanced dashboard and RUM views with new `searchType` attributes for
better data filtering.

- **Refactor**
- Standardized search functionality across different modules and
components.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
2024-06-03 14:14:54 +05:30
Taiming Liu 51d6c8e077 fix: inverted index query count (#3627) 2024-06-03 14:17:04 +08:00
Hengfei Yang ac1ced2ac6 feat: allow disable gxhash dependency (#3660) 2024-06-03 14:16:36 +08:00
Hengfei Yang e5b7476c52 fix: recordbatch format (#3659)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved the logic for formatting record batches to handle cases where
schema fields are empty before comparison, ensuring more robust data
processing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-01 14:34:03 +05:30
Hengfei Yang 3ccf0be933 feat: add limit -1 for query (#3658)
The query `size` works like this, it should more clear now:
1. size > 0, it will return hits equal to `size`
2. size = 0, it will return empty hits, this used to other purposes,
like: get total, get aggs.
3. size = -1, it will use a backend default limit to return hits,
setting by `ZO_QUERY_DEFAULT_LIMIT=1000`

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

## Summary by CodeRabbit

- **Bug Fixes**
- Corrected handling of query parameters by changing types from `usize`
to `i64` to support larger values and prevent potential overflow issues.

- **Improvements**
- Enhanced the logic for setting query limits to handle negative values
more gracefully, ensuring better default behavior.

- **Refactor**
- Updated various internal structures and function signatures to use
`i64` instead of `usize` for consistency and improved range handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-01 11:25:12 +05:30
Hengfei Yang 175fd50456 fix: panic when format recordbatch (#3651) 2024-05-31 20:16:51 +08:00
Subhra264 c4dc851e91 fix: format the WHERE IN clause in scheduler mysql pull query (#3650)
Fixes #3640 



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

## Summary by CodeRabbit

- **New Features**
- Improved the efficiency of updating and fetching scheduled jobs by
using dynamic SQL query construction based on job IDs.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-05-31 16:54:51 +05:30
Ashish Kolhe beeec9143f fix: revert renaming match_all (#3645)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
  - Enhanced search functionality with indexed matching options.

- **Bug Fixes**
  - Updated SQL queries in tests to align with new matching functions.

- **Improvements**
- Standardized naming conventions for matching functions to improve
clarity and consistency.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-05-31 14:36:52 +05:30
Hengfei Yang 5e2ea1aaed perf: improve search limit logic (#3638)
- [x] If the search request size is 0 and in full sql mod and track
total hits, will not apply default limit `1000`.
- [x] change consistent hashing vnode default value to `16`

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

## Summary by CodeRabbit

- **Improvements**
- Enhanced performance and accuracy of data aggregation by updating
internal logic and default values.
- Improved configuration flexibility by allowing custom `history`
values.

These changes aim to provide a more robust and configurable experience
for end-users.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-05-31 10:56:50 +05:30
ktx-vaidehiandktx-abhay 60a64fcc07 feat: Multi Select Variable (#3372)
- #3460 
- #2015 

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

- **New Features**
  - Added multi-select functionality for variables in dashboards.
  - Introduced a custom value selector component for dashboard settings.
  - Updated the app to use Quasar's fullscreen module.

- **Enhancements**
  - Improved query verification process in DashboardQueryEditor.
- Enhanced filtering logic for variable placeholders and values in
queries.
  - Added "IN" operator support for dashboard queries.

- **Bug Fixes**
- Fixed issues with handling and displaying selected values in various
components.

- **Performance Improvements**
- Increased size parameter for dashboard panel data loading from 10 to
100.

- **Localization**
- Added new localization key: "multiSelect" for multiple selection
support.

- **UI/UX**
  - Updated styles and key bindings in DrilldownPopUp.
- Enhanced display logic for selected values in
VariableQueryValueSelector.

- **Dependencies**
  - Updated Quasar package from version ^2.7.5 to ^2.15.4.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
2024-05-30 21:15:05 +05:30
ktx-vaidehi 523ca46ae6 feat: dashboard variables adding options (#3543)
- Multiple filters for the same field.
- Added p99, p95, p90 and p50 as an option on y-axis
- In Drilldown popup will now get variables value of current dashboard

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

- **New Features**
- Added new percentile aggregation options (`p50`, `p90`, `p95`, `p99`)
across various dashboard components.
- Introduced `variablesData` prop to enhance data handling in several
components.

- **Improvements**
- Enhanced error handling and asynchronous operations in dashboard panel
functionalities.
- Improved readability and maintainability of aggregation functions in
query components.

- **Localization**
- Added new keys for percentiles (`p50`, `p90`, `p95`, `p99`) in the
English language file.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-05-30 20:26:36 +05:30
Hengfei Yang 5cabf55ad2 fix: change the log level for move file (#3636) 2024-05-30 22:12:27 +08:00
Hengfei Yang 950e14c54d perf: improve file move on ingester (#3622) 2024-05-30 20:55:16 +08:00
Hengfei Yang 569bb121ce feat: add new node role flatten_compactor (#3589) 2024-05-30 18:34:41 +08:00
Hengfei Yang 5a8c30e8a1 fix: select case when report field not found (#3633) 2024-05-30 17:49:55 +08:00
Hengfei Yang 7d6b983955 fix: reload .env (#3625) 2024-05-30 09:48:27 +08:00
Ankur SrivastavaandHengfei Yang 8f3df9e7a1 feat: support reloading config vars using an API (#3623)
The new endpoint `/config/reload` will refresh the
environment variables.

There are a bunch of env-vars which will not be reloaded
for e.g. HTTP_PORT etc. these will need a restart.

---------

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2024-05-30 08:23:27 +08:00
Hengfei Yang 26c81f4af1 fix: allow add older data with schema change (#3610) 2024-05-29 12:40:41 +08:00
Taiming Liu fc05d06c9a refactor: rename match_all & match_all_indexed (#3613)
match_all                  renamed to match_all_raw
match_all_indexed   renamed to match_all

same pattern applied to *_ignore_case functions

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

- **Bug Fixes**
- Improved clarity in function names for better understanding and
usability.

- **Tests**
- Updated SQL queries in test cases to reflect changes in function
names, ensuring accurate test results.

- **Chores**
- Adjusted logging statements to provide better insights during
debugging.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-05-28 14:04:36 -07:00
Hengfei Yang 83305a2d44 feat: add histogram interval for search api (#3607) 2024-05-28 17:16:20 +08:00
Hengfei Yang c830fa6532 perf: use parquet file static cache (#3604) 2024-05-28 10:43:24 +08:00
Ashish Kolhe b3a3edcd34 fix: ofga check versions before acquiring lock (#3603)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Improvements**
- Enhanced initialization process to prevent redundant cluster lock
creation when the existing OFGA model version matches the fetched
version. This improvement reduces unnecessary operations and improves
system efficiency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-05-27 21:17:10 +05:30
Ankur Srivastava 28cf5b0776 feat: integrate embedded reportserver (#3583)
There are three cases to consider:

if ZO_ENABLE_EMBEDDED_REPORT_SERVER=true

If running a binary, alertmanager node will spawn an embedded server
running at localhost:5082.
All the requests from alert-manager will go to localhost:5082 for pdf
generation related tasks.

For single node k8s deployment, as this is running in a container there
is no chromium installed, so even if you set the variable to true, the
report server will panic due to missing dependencies. For this situation
helm chart will spawn a report-server instance which can be used.

Same for cluster deployment.

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

## Summary by CodeRabbit

- **New Features**
  - Introduced a new report server for generating and sending reports.
  - Added health check and report sending endpoints.

- **Improvements**
  - Enhanced logging for report server operations.
- Configurable option to skip TLS verification for report server
connections.

- **Bug Fixes**
  - Fixed formatting issue in HTTP status request handler.

- **Chores**
- Updated dependencies and configurations for the new report server
module.

- **Documentation**
- Added new structures and functions for email configuration, report
generation, and server operations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-05-27 11:19:50 +02:00
Hengfei Yang 470714616b fix: search partition with base64 (#3597)
fix #3557
2024-05-26 17:00:44 +08:00
Ashish Kolhe a000dad31b fix: get auth headers (#3578) 2024-05-25 03:17:57 -07:00
Taiming LiuandNeha P 37ebd33637 fix: _around api for query with limit (#3590)
fix #3587 

<img width="1286" alt="image"
src="https://github.com/openobserve/openobserve/assets/90490946/38ed9e95-6569-4015-a156-6040b0d3fc7c">

---------

Co-authored-by: Neha P <neha@openobserve.ai>
2024-05-24 16:50:35 -07:00
Subhra264 bd07961a1f fix: sso member roles for an org should not be changeable via UI (#3536) 2024-05-24 10:45:28 +05:30
Hengfei Yangandoasisk 2fbec75612 perf: testing optimise aggeration query (#3582)
add a new test environment:
```
ZO_DATAFUSION_PARQUET_STAT_DISABLE_FOR_AGGS=false
```

Set to `true` will skip collect stat for parquet files, then it will
faster.

And, i am thinking the final solution should be cache parquet
statistics, or we can optimize datafusion let it only collect stat for
registered schema fields.

---------

Co-authored-by: oasisk <ashish.j.kolhe@gmail.com>
2024-05-24 10:21:27 +05:30
Ankur Srivastava e4f4389974 feat: support build-type in configuration (#3581)
![image](https://github.com/openobserve/openobserve/assets/1695056/35b2adcf-b461-4471-8962-0bd0410dca31)


![image](https://github.com/openobserve/openobserve/assets/1695056/118726c1-b276-4cae-8689-cb21ef3ae53c)
2024-05-23 18:20:18 +02:00
Subhra264 6936b32bb3 fix: map_group_to_roles custome roles should be scoped under org in rbac (#3546) 2024-05-23 20:44:36 +05:30
Hengfei Yang 9918e24623 feat: let consistent hash vnode num become an evironment (#3577) 2024-05-23 22:31:50 +08:00
Hengfei Yang 0f5929093a perf: optimize scan_files (#3575) 2024-05-23 19:00:27 +08:00
Subhra264 fca47ef225 fix: add dynamic variables to report and allow v1, v2 dashboards in reports (#3574)
- [x] Add dynamic variables
- [x] Allow v1, v2 dashboards in reports
2024-05-23 15:48:04 +05:30
Subhra264 41d9eefc1f feat: use a separate chrome server for report (#3563)
Fixes #3355 

User must use a separate chrome server if `ZO_CHROME_PATH` is not
specified. `ZO_REPORT_SERVER_URL` is introduced to specify the report
server url.
2024-05-23 13:14:35 +05:30
Taiming LiuandHengfei Yang a83c46c656 feat: cluster selection in logs (#3559)
- Add cluster selection in logs search queries for additional filtering
based on region/clusters
- add org/stream info in ingestion http handler error logging

---------

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2024-05-22 07:33:34 -07:00
Subhra264 81702df703 fix: report issues (#3564)
Fixes #3558 

- [x] When SSO is enabled reports don't work , because of UI having two
login options
- [x] Scheduled job has end_time which is not current & retries are not
working
- [x] If a report is paused during execution , the reports status get
changed after execution to enabled = true again
- [x] After editing a report that was set to once to per min, the report
is not sent every minute
- [x] RBAC error while trying to enable/disable a report
2024-05-22 16:48:18 +05:30
Hengfei Yang f6463e3d6e fix: search count wrong (#3560) 2024-05-22 09:18:21 +05:30
Hengfei Yang c328e8a270 fix: use defined schema for vertical partition merge (#3556)
- [x] Use defined schema fields for vertical partition merge
- [x] Fix concat recordbatch schema mismatch
2024-05-21 23:43:10 +08:00
ktx-vaidehiandktx-abhay ee29091667 feat: dashboard date-time settings (#3421)
- #3538 
- #3179

---------

Co-authored-by: ktx-abhay <abhay.padamani@kiara.tech>
2024-05-21 17:34:01 +05:30
Ashish Kolhe a03b4d14e0 feat: login using basic auth headers (#3550) 2024-05-21 12:13:09 +05:30
Taiming Liu 4b5a708a51 perf: merge parquet files (#3545)
Load small parquet files into memory to create a merged RecordBatch to
be sorted directly instead of using querying DataFusion for the same
purpose.

Merging 6 parquet files, each with 20 row by 30k columns

**Before**
openobserve::service::compact::merge: merge_parquet_files took: 35.473  
openobserve::service::compact::merge: merge_parquet_files took: 37.249  
openobserve::service::compact::merge: merge_parquet_files took: 38.337  
openobserve::service::compact::merge: merge_parquet_files took: 38.759  
openobserve::service::compact::merge: merge_parquet_files took: 38.920

**After**
openobserve::service::compact::merge: merge_parquet_files took 3.399  
openobserve::service::compact::merge: merge_parquet_files took 3.781  
openobserve::service::compact::merge: merge_parquet_files took 4.017  
openobserve::service::compact::merge: merge_parquet_files took 4.162  
openobserve::service::compact::merge: merge_parquet_files took 4.441
2024-05-20 09:26:31 -07:00
Hengfei Yang d84726e5db refactor: merge parquet files interface (#3547)
Prepare for vertical partition compact, change the interface first.
2024-05-20 15:31:25 +08:00
Hengfei Yang 08ab4e8ce7 fix: inverted index create error when the recordbatch is empty (#3544) 2024-05-19 22:10:35 +08:00
Taiming Liu d1ed92b2f6 chore: added org_id & stream_name to apply_vrl_fn error logging (#3455) 2024-05-18 09:57:38 +08:00
Subhra264 90cc1b2b82 fix: GET rbac permission for settings (#3368) 2024-05-17 15:18:45 +05:30