Skip to content

[Feature] Support cold metrics query for metrics/traces/logs in BanyanDB storage #13093

@wu-sheng

Description

@wu-sheng

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

With #12938 is going to be added in 10.2, UI and Query APIs are required to change adaptively. The cold data is long-term-persistent data in low-cost data storage, e.g. SATA, S3. Although BanyanDB API will provide nearly 100% compatible query by following the query time range to determine whether to hit on this kind of data, the reality is, the query will be much slower compared with hot and warm data.

So, to be reasonable and response time more predictable, we should indicate a query to include this kind of data from UI and API perspectives.

I am proposing two kinds of API @wankai123 @hanahmily

  1. cold-data supported. There are two conditions for this API to return true, <1> BanyanDB storage enabled, <2> BanyanDB enabled label=cold feature data node with proper cold data TTL.
  2. Extra flag to indicate this query for metrics/traces/logs should include cold data, we could use the term Archived historical data or Long-term historical data as the name to this flag.

@Fine0830 For the UI part, we should have a check-box(or some other way) to provide this flag to the end user, and by default, NO query should enable this.
The API <1> could determine whether UI shows this flag as other storages(JDBC and Elasticsearch) don't have such a feature.

The UI style for trace and log queries is easy, we could easily add a check-box to these widgets.
But for metrics, the tricky point is, the query is slow. If we add this check-box to the global time-range selector, the dashboard is very hard to load. @Fine0830 You could think about how we should add this, my idea for now is, we just support historical data query in a pop-up box. For the metrics widget, we could add a menu item for it, the user could click that to pop up a query box, and in there, the user could(by the check-box checked) query data from a longer days ago.

Use case

No response

Related issues

No response

Are you willing to submit a pull request to implement this on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Metadata

Metadata

Labels

backendOAP backend related.featureNew feature

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions