wu-sheng commented on issue #10080:
URL: https://github.com/apache/skywalking/issues/10080#issuecomment-1364487530

   I reviewed the PromQL. I think besides the basic grammar, we could choose 
these four APIs as MVP
   1. Metadata Query API, 
https://prometheus.io/docs/prometheus/2.37/querying/api/#querying-metadata. 
Metadata has a specific meaning for us. We could expose our metadata metric 
names(e.g. service_traffic).
      - listMetrics could be considered a kind of metadata if possible(TBD)
   2. Metrics value Query API,  
https://prometheus.io/docs/prometheus/2.37/querying/api/#expression-queries. 
Metrics as time-series values could be queried and returned in the expected 
format.
      - When the `range` is missed, we could pick the latest 30 mins
      - We need to recognize and pick dimensions automatically, to avoid `too 
many data points` error and overload
      - There should be a complete label set to define our scope in order to 
get metrics correctly. I didn't read Grafana+PromQL Datasource carefully yet, 
but I hope we have a chance to provide topology, at least topology line metrics.
   3. Alerts API, 
https://prometheus.io/docs/prometheus/2.37/querying/api/#alerts. This could 
directly query our alarms with some pre-defined labels(e.g. rule_name)
   4. Build Info, 
https://prometheus.io/docs/prometheus/2.37/querying/api/#build-information. 
This is our version service.
   
   With all the implementation, we need to define our details, mostly about 
specific labels. Complete docs should be added under `APIs/Query APIs/PromQL`
   <img width="247" alt="image" 
src="https://user-images.githubusercontent.com/5441976/209427655-76b5969a-27c9-4f3c-ba4f-8f082c5879c3.png";>
    
   **Notice, we should explicitly declare at the top of the new PromQL API doc. 
The APIs are built on top of GraphQL APIs, and only provide a feature subset of 
GraphQL APIs**.
   
   @wankai123 Please add anything you found on your side. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to