xo icon indicating copy to clipboard operation
xo copied to clipboard

Add full MetricsQL syntax support with some query improvements

Open denisgolius opened this issue 3 years ago • 12 comments

Hi there! Some times ago Grafana has ignored improvement from @hagen1778 on this pr https://github.com/grafana/grafana/pull/16694 and it will be a great new future in your product to add this for support. VictoriaMetrics has many other improvements with extended query syntax named MetricsQL - especial with using WITH templates.

denisgolius avatar Aug 16 '21 12:08 denisgolius

Thanks for your suggestion.

Currently I'm updating datav to keep up with Grafana 8.1, after this, I will seriously to adopt your suggestion.

sunface avatar Aug 19 '21 02:08 sunface

hey @sunface Do you have any ETA for the next release date?

denisgolius avatar Jun 16 '23 11:06 denisgolius

hi @denisgolius , first release will be launched at about early July

sunface avatar Jun 20 '23 00:06 sunface

hey @denisgolius , I made a brief summary about the changes in next release, :

I have remove all the code came from Grafana and built a newly version from scratch, there are few reasons:

  1. Grafana have many historical issues in it's codebase, like: mix React and angular, external plugins system, complex codebase, deeply integrated with redux etc. In a word: grafana's codebase is very very complex, and very hard for deeply secondary development.
  2. Grafana is designed for general visualization purpose, so it's not very fitable for Observability and APM cases, as a comparison, although Datav can be also used for general purpose, but it's main purpose is Observability and APM, so many design features are different from Grafana.
  3. We need more beautiful UI and LargeScreen supported

Back to this issue, we will support prometheus and jaeger natively, VM is also a great option, so here is a question:

If Datav wants to support VM natively , what's the main difference between VM and prometheus when implement the panel plugin. From my perspective, VM seems fully support PromQL grammar.

sunface avatar Jun 20 '23 00:06 sunface

If Datav wants to support VM natively , what's the main difference between VM and prometheus when implement the panel plugin. From my perspective, VM seems fully support PromQL grammar.

It does. The main differences between Prom and VM in terms of plugin implementation are the following:

  1. VM supports chars in label names which aren't supported by Prometheus. See the following issue https://github.com/grafana/grafana/issues/42615
  2. Additionally to PromQL, VictoriaMetrics supports a wide range of extra functions in MetricsQL
  3. WITH templates support brings new experience in query language by allowing to define functions or time series filters in advance. But that's optional.

hagen1778 avatar Jun 20 '23 11:06 hagen1778

All right, I will dig into it ,thanks :)

sunface avatar Jun 21 '23 01:06 sunface

All right, I will dig into it ,thanks :)

Hey! Any updates for play/etc? I see the network error on play image

denisgolius avatar Aug 31 '23 10:08 denisgolius

Hi @denisgolius, play.datav.io should be accessible now, and the new website and docs will release in several days later :)

sunface avatar Aug 31 '23 11:08 sunface

Hi all, I'm going to add VM as a native datasource plugin to Datav.

Please feel free to leave message here if there are any problems :)

sunface avatar Sep 20 '23 00:09 sunface

Hi all, I have added a basic VM plugin in datav, you can have a try now :)

image

And datav support datasource docs now, it can help users quickly find the query grammar they want, could you please add some docs to VM plugin in Datav :D

The image below is the Prometheus datasource docs which I copy from prometheus website:

image

sunface avatar Sep 27 '23 13:09 sunface

Hi, @sunface. We have created a pull request with documentation for the VM plugin. You can find it at the following link: https://github.com/data-observe/datav/pull/268. Please feel free to check it out and let us know if there are any further improvements we can make.

Loori-R avatar Oct 06 '23 16:10 Loori-R

Hi, @sunface. We have created a pull request with documentation for the VM plugin. You can find it at the following link: #268. Please feel free to check it out and let us know if there are any further improvements we can make.

Great, that will be very helpful to VM users :D

sunface avatar Oct 07 '23 13:10 sunface