Add Indexer.Size() and index_size metric
This commit is contained in:
@@ -217,6 +217,15 @@ func (s *Server) setupMetrics() {
|
||||
"Duration of crawler tasks",
|
||||
)
|
||||
|
||||
// Index stats
|
||||
metrics.NewGaugeFunc(
|
||||
"index", "size",
|
||||
"Size of index (number of indexed entries)",
|
||||
func() float64 {
|
||||
return float64(s.indexer.Size())
|
||||
},
|
||||
)
|
||||
|
||||
// server info
|
||||
metrics.NewGaugeVec(
|
||||
"server", "info",
|
||||
|
||||
Reference in New Issue
Block a user