Add Indexer.Size() and index_size metric

This commit is contained in:
James Mills
2021-02-07 21:12:49 +10:00
parent c31fc9569f
commit ce4b180576
3 changed files with 390 additions and 0 deletions

View File

@@ -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",