Skip to content

Commit

Permalink
Hotfix: Fix search_total_indexing_time metric type
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 committed Oct 8, 2024
1 parent c59f5c4 commit 679fda6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,6 @@ func NewRedisExporter(redisURI string, opts Options) (*Exporter, error) {
// 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 +348,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 679fda6

Please sign in to comment.