Skip to content

Commit 0af589d

Browse files
Apply suggestions from code review
Co-authored-by: Yaroslav Dynnikov <[email protected]>
1 parent 6e73349 commit 0af589d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

metrics/default_metrics/tarantool/init.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,13 @@ local default_metrics = {
1919
}
2020

2121
local function delete_collectors(list)
22+
if list == nil then
23+
return
24+
end
2225
for _, collector in pairs(list) do
2326
metrics.registry:unregister(collector)
2427
end
28+
table.clear(list)
2529
end
2630

2731
local function enable(include, exclude)

metrics/default_metrics/tarantool/memory.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ local function update_memory_metrics()
1111
local i = box.info.memory()
1212
for k, v in pairs(i) do
1313
local metric_name = 'info_memory_' .. k
14-
collectors_list[metric_name] = utils.set_gauge(metric_name, 'Memory' .. k, v)
14+
collectors_list[metric_name] = utils.set_gauge(metric_name, 'Memory ' .. k, v)
1515
end
1616
end
1717
end

0 commit comments

Comments
 (0)