Skip to content

Commit

Permalink
Hotfix: Fix search_total_indexing_time metric type (#958)
Browse files Browse the repository at this point in the history
According to my tests this metric type is counter, I'm renaming it according to Prometheus recommendations and moving to `metricMapCounters` map.
  • Loading branch information
nantiferov authored Oct 8, 2024
1 parent c59f5c4 commit 6d86815
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,9 @@ func NewRedisExporter(redisURI string, opts Options) (*Exporter, error) {
"long_lock_waits": "long_lock_waits_total",
"current_client_thread": "current_client_thread",

// Redis Modules metrics
// RediSearch module
// Redis Modules metrics, RediSearch module
"search_number_of_indexes": "search_number_of_indexes",
"search_used_memory_indexes": "search_used_memory_indexes_bytes",
"search_total_indexing_time": "search_total_indexing_time_ms",
"search_global_idle": "search_global_idle",
"search_global_total": "search_global_total",
"search_bytes_collected": "search_collected_bytes",
Expand Down Expand Up @@ -349,6 +347,9 @@ func NewRedisExporter(redisURI string, opts Options) (*Exporter, error) {
"cached_keys": "cached_keys_total",
"storage_provider_read_hits": "storage_provider_read_hits",
"storage_provider_read_misses": "storage_provider_read_misses",

// Redis Modules metrics, RediSearch module
"search_total_indexing_time": "search_indexing_time_ms_total",
},
}

Expand Down
2 changes: 1 addition & 1 deletion exporter/modules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestModules(t *testing.T) {
"module_info": false,
"search_number_of_indexes": false,
"search_used_memory_indexes_bytes": false,
"search_total_indexing_time_ms": false,
"search_indexing_time_ms_total": false,
"search_global_idle": false,
"search_global_total": false,
"search_collected_bytes": false,
Expand Down

0 comments on commit 6d86815

Please sign in to comment.