Unified Storage Indexer: Add back metrics (#97310)

* Adds back indexer metrics. Uses config values instead of hardcoded ones.

* cast to int64

* remove unused func

* Index metrics impl doesn't depend on Bleve. Adds a TotalDocs func to SearchBackend interface.

* adds config setting for index_min_count

* rename arg

* rename metric label to namespace instead of slug

* adds default "do nothing" case to satisfy linter

* moves bleve index metrics to search package

* make bleve backend private, dont need to pass in prom reg

* imports

* adds bleve metrics to resource package to avoid circular deps
This commit is contained in:
owensmallwood
2024-12-04 15:02:40 -06:00
committed by GitHub
parent 39b6e712bb
commit 70c9c3889f
7 changed files with 231 additions and 32 deletions
+6 -5
View File
@@ -527,11 +527,12 @@ type Cfg struct {
ShortLinkExpiration int
// Unified Storage
UnifiedStorage map[string]UnifiedStorageConfig
IndexPath string
IndexWorkers int
IndexMaxBatchSize int
IndexListLimit int
UnifiedStorage map[string]UnifiedStorageConfig
IndexPath string
IndexWorkers int
IndexMaxBatchSize int
IndexFileThreshold int
IndexMinCount int
}
type UnifiedStorageConfig struct {