Commit Graph
56 Commits
Author SHA1 Message Date
Prabhat Sharma f39a3de5a1 fix: rename zinc labs to OpenObserve (#4822)
Rename Zinc Labs to OpenObserve
2024-10-18 13:11:52 +08:00
Hengfei Yang 309cddaf27 perf: query file_list in parallels by day (#4669) 2024-10-01 23:21:32 +08:00
Hengfei Yang d1ed457369 feat: new search engine (#4182) 2024-09-20 15:10:54 +08:00
Yashodhan Joshi d45ac8f9ad fix: unify the trace ingestion handling (#4435) 2024-09-05 13:33:15 +08:00
Subhra264 7680952cdd fix: use ofga mapping in tuple object type for search permission checking (#4456)
Fixes #4455 

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

- **New Features**
- Enhanced authorization checks for `query`, `query_range`, and `series`
functions to dynamically reflect stream types.
- Improved permission validation logic in the `search` and
`search_multi` functions, allowing for more accurate access control
based on user roles and stream types.
- Updated logic in the `get_latest_traces` function to refine the
construction of the `o2_type` field for better permission checks.

- **Bug Fixes**
- Corrected the mapping of stream types to model keys, enhancing
security and accuracy in permission checks.

- **Chores**
- Added necessary imports for `OFGA_MODELS` to support new permission
logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-09-04 14:23:45 +05:30
Taiming Liu 7f75a4d6db feat: use FST for inverted indexing (#4270) 2024-09-02 22:39:44 +08:00
Hengfei Yang 8a0dbe2cf4 feat: remove sql_mode, query_context and aggs from search API (#4089) 2024-07-31 11:23:11 +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
Taiming Liu 4bff0be32e fix: trace's span name (#3916) 2024-07-06 22:16:55 +08:00
Huaijin 33343bbab3 feat: add metrics for query lifetime (#3893) 2024-07-04 14:13:25 +08:00
Omkar KesarkhaneandTaiming Liu 7eafb64d71 fix: added traces ids support in search requests (#3872)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced trace ID management with functions for adding, removing,
and generating trace contexts.
  - Added the ability to cancel running queries.

- **Enhancements**
- Integrated tracing functionality into search operations for improved
observability.
  - Updated CORS configuration to allow `traceparent` headers.

- **Debugging**
  - Added console logs for traceparent parameters in search functions.

- **Localization**
  - Added new localization key for "cancel" message in English.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Taiming Liu <liutaiming3@gmail.com>
2024-07-02 07:02:30 -07:00
Hengfei Yang 611f2e1c29 perf: improve ingestion (#3678) 2024-06-12 22:01:03 +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
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 569bb121ce feat: add new node role flatten_compactor (#3589) 2024-05-30 18:34:41 +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 517de8f05d fix: add region filter to _value and _around API (#3449) 2024-05-09 20:00:32 +08:00
Hengfei Yang 32b7ce4c26 feat: improve super cluster (#3428)
- [x] add timeout and partical success for super cluster
- [x] add region filter for super cluster
2024-05-08 16:32:54 +08:00
Hengfei Yang 8a73f2cf05 fix: value API is always waiting (#3364)
fixed #3334
2024-04-28 22:30:07 +08:00
Hengfei Yang 8d1ead5105 fix: add more debug logs for search (#3280) 2024-04-19 20:01:39 +08:00
HuaijinandHengfei Yang cacf46e480 feat: only enable tracing in search (#3230)
close #3215 
use follow to only enable tracing in search
```
ZO_TRACING_ENABLED=false
ZO_TRACING_SEARCH_ENABLED=true 
```

---------

Co-authored-by: Hengfei Yang <hengfei.yang@gmail.com>
2024-04-15 18:43:34 +08:00
Hengfei Yang a48326861f feat: complete super cluster (#3226) 2024-04-12 13:45:02 +08:00
Huaijin 35d42fe228 feat: replace sessiond_id to trace_id when enable tracing (#3204) 2024-04-10 13:38:22 +08:00
Huaijin b8e1790030 fix: modify cancel query status code to 429 (#3206) 2024-04-10 13:17:12 +08:00
Huaijin 951c55bd92 feat: make user can cancel query task by session_id (#3130) 2024-04-08 23:43:05 +08:00
Hengfei Yang 611b955b10 refactor: separate search structure to config crate (#3186)
- [x] Separate search structure into config crate
- [x] fixed #3084
2024-04-07 12:01:47 +08:00
Hengfei Yang fd49360f49 feat: add quick mode fields (#3068) 2024-03-22 15:54:39 +08:00
Hengfei Yangandoasisk e1097f86e2 feat: add fast mode for query (#2876)
Use **Fast Mode** when dealing with thousands of fields. It retrieves
the first N fields for a quicker response.

Enable it through this configuration: 

```
ZO_FAST_MODE_NUM_FIELDS=50
ZO_FAST_MODE_STRATEGY=first/last/both
```

And use the search API:

```json
{
	"query": {
		"sql": "select * from default ",
		"start_time": 1709711116396000,
		"end_time": 1709712016396000,
		"from": 0,
		"size": 250,
		"sql_mode": "full",
		"fast_mode": true
	}
}
```

When the backend identifies a request:
- Using `fast_mode` 
- With an `SQL` prefix of `select *` 
- Where schema fields exceed `ZO_FAST_MODE_NUM_FIELDS` 

It will then rewrite the `SQL` to `select f1,f2,f3`, where 'fn'
represents the first 'n' fields from schema. The value of 'n' is
determined by `ZO_FAST_MODE_NUM_FIELDS`.

In the end you can set `ZO_FAST_MODE_STRATEGY=first/last/both` to
control the order for pickup fields from schema.

---------

Co-authored-by: oasisk <ashish.j.kolhe@gmail.com>
2024-03-06 19:50:30 +05:30
Hengfei Yang 24919333d6 perf: improve traces ingestion (#2708) 2024-02-16 23:23:02 +08:00
Ashish Kolheandomkark06 d9e022bc04 fix: support native users in rbac (#2683)
Co-authored-by: omkark06 <omkar@zinclabs.io>
2024-02-11 10:43:01 +05:30
Hengfei Yang 79682120f0 feat: search queue management (#2621) 2024-02-01 11:54:01 +08:00
Hengfei Yang 4a623e632e fix: debug tokio schedule problem (#2594) 2024-01-27 20:15:09 +08:00
Hengfei Yang cc78486589 feat: improve id generate (#2523) 2024-01-20 19:34:58 +08:00
Hengfei Yang 9b8d1c74e9 feat: alert support PromQL (#2432) 2024-01-11 00:17:59 +08:00
Hengfei Yang a4bae1a584 feat: Implement memtable + wal (#2261) 2023-12-28 07:40:22 +08:00
Hengfei Yang ab4dafcd8f fix: Fixed some small issues (#2241)
Fixed some small issues

- [x] #2174
- [x] #2234
2023-12-18 10:00:53 -08:00
Hengfei Yang 48c555a076 fix: #2147 (#2163) 2023-12-12 15:35:13 +08:00
Hengfei Yang 1b0b8c2bf5 chore: update format (#2144)
fixed #2102
2023-12-07 10:10:45 +05:30
Hengfei Yang 63d2f1522c feat: add more variables for alerts (#1973) 2023-12-01 23:27:43 +08:00
Prabhat Sharma 5db4ca191a change license to AGPL 2023-11-26 18:34:59 -08:00
Hengfei Yang c305aaf90a feat: add table format for search response (#2012) 2023-11-23 23:11:26 +08:00
Hengfei Yang 3ce58a4d66 fix: add _timestamp for the traces latest data query (#1999) 2023-11-22 21:09:23 +08:00
Hengfei Yang 8097f47d8a fix: change latest traces data api to get (#1990) 2023-11-22 17:14:58 +08:00
Hengfei Yang de026b1a31 fix: don't need to send broadcast with mysql (#1985)
fixed #1984
2023-11-21 20:47:39 +08:00
Ashish Kolhe af2d805be2 fix: OTLP ingestion fixes (#1547)
Fixes https://github.com/openobserve/openobserve/issues/1544

- [x] Accept ingestion token for v1/logs v1/metrics 
- [x] Introduce optional header Stream_Name to accept stream name
- [x] change zinc_org_id to Organisation
2023-09-20 13:05:26 +05:30
Ashish Kolhe 56655cdbef feat: otlp http for logs & metrics (#1482) 2023-09-11 15:25:31 +05:30
Ashish Kolhe c013e90532 fix: traces issues 1316 1090 (#1410) 2023-08-22 16:06:20 +08:00
Hengfei Yang af521fde54 fix: update license (#1404) 2023-08-21 15:37:50 +08:00
Ankur Srivastava e2dd047bf5 refactor: move infra and meta inside common (#1105)
This is the first step towards splitting the repo into smaller sub
projects.
2023-07-06 12:32:07 +05:30
Hengfei Yang 8c74eaac84 feat: impl metrics http json API (#999)
## Design Spec:

- POST `/api/:org/ingest/metrics/_json`

```json
[
    {
        "__name__": "stream name",
        "__type__": "counter / gauge / histogram / summary",
        "label_name1": "label_value1",
        "label_name2": "label_value2",
        "_timestamp": 0, // unix timestamp in millisecond
        "value": 0.0 // float64 value
    }
]
```

## How to use this API:
- must use `__name__` set stream name.
- must use `__type__` set metrics type. and the type can't be updated
after first record
- `_timestamp` needs UNIX timestamp or empty will fill by current
timestamp
- `value` should be float64 or int64

## Example:

POST `/api/default/ingest/metrics/_json`
```json
[
    {
        "__name__": "cpu",
        "__type__": "gauge",
        "namespace": "ziox",
        "container": "zo1",
        "_timestamp": 1687326643584062,
        "value": 10.1
    },
    {
        "__name__": "cpu",
        "__type__": "gauge",
        "namespace": "ziox",
        "container": "zo2",
        "value": 0.1
    }
]
```
2023-06-21 23:02:41 +08:00