File tree Expand file tree Collapse file tree 3 files changed +14
-12
lines changed
Expand file tree Collapse file tree 3 files changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -48,10 +48,12 @@ HTTP Endpoints
4848Global metrics
4949--------------
5050
51- | Metric | Description |
52- | -------------------------------------| --------------------------------------------------------------------------------|
53- | ` azure_resourcegraph_querytime ` | Summary metric about query execution time |
54- | ` azure_resourcegraph_ratelimit ` | Current ratelimit value from the Azure API |
51+ | Metric | Description |
52+ | --------------------------------------| --------------------------------------------------------------------------------|
53+ | ` azure_resourcegraph_query_time ` | Summary metric about query execution time (incl. all subqueries) |
54+ | ` azure_resourcegraph_query_results ` | Number of results from query |
55+ | ` azure_resourcegraph_query_requests ` | Count of requests (eg paged subqueries) per query |
56+ | ` azure_resourcegraph_ratelimit ` | Current rate limit value from the Azure API |
5557
5658
5759Example
Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ package main
33import "github.com/prometheus/client_golang/prometheus"
44
55var (
6- prometheusQueryTime * prometheus.SummaryVec
7- prometheusQueryResults * prometheus.GaugeVec
8- prometheusQueryRequestCount * prometheus.CounterVec
9- prometheusRatelimit * prometheus.GaugeVec
6+ prometheusQueryTime * prometheus.SummaryVec
7+ prometheusQueryResults * prometheus.GaugeVec
8+ prometheusQueryRequests * prometheus.CounterVec
9+ prometheusRatelimit * prometheus.GaugeVec
1010)
1111
1212func initGlobalMetrics () {
@@ -34,17 +34,17 @@ func initGlobalMetrics() {
3434 )
3535 prometheus .MustRegister (prometheusQueryResults )
3636
37- prometheusQueryRequestCount = prometheus .NewCounterVec (
37+ prometheusQueryRequests = prometheus .NewCounterVec (
3838 prometheus.CounterOpts {
39- Name : "azure_resourcegraph_query_request_count " ,
39+ Name : "azure_resourcegraph_query_requests " ,
4040 Help : "Azure ResourceGraph query request count" ,
4141 },
4242 []string {
4343 "module" ,
4444 "metric" ,
4545 },
4646 )
47- prometheus .MustRegister (prometheusQueryRequestCount )
47+ prometheus .MustRegister (prometheusQueryRequests )
4848
4949 prometheusRatelimit = prometheus .NewGaugeVec (
5050 prometheus.GaugeOpts {
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ func handleProbeRequest(w http.ResponseWriter, r *http.Request) {
108108 Options : & RequestOptions ,
109109 }
110110
111- prometheusQueryRequestCount .With (prometheus.Labels {"module" : moduleName , "metric" : queryConfig .Metric }).Inc ()
111+ prometheusQueryRequests .With (prometheus.Labels {"module" : moduleName , "metric" : queryConfig .Metric }).Inc ()
112112
113113 var results , queryErr = resourcegraphClient .Resources (ctx , Request )
114114 if results .TotalRecords != nil {
You can’t perform that action at this time.
0 commit comments