Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.

Commit 54d9381

Browse files
author
Konstantin Nazarov
authored
Merge pull request #9 from tarantool/fix-box-cfg
check whether box.cfg called
2 parents b55a693 + 0e61798 commit 54d9381

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tarantool-metrics.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,12 @@ local function measure_tarantool_space_stats()
7171
end
7272

7373
local function measure_tarantool_metrics()
74-
measure_tarantool_memory_usage()
75-
measure_tarantool_request_stats()
76-
measure_tarantool_uptime()
77-
measure_tarantool_space_stats()
74+
if type(box.cfg) ~= 'function' then
75+
measure_tarantool_memory_usage()
76+
measure_tarantool_request_stats()
77+
measure_tarantool_uptime()
78+
measure_tarantool_space_stats()
79+
end
7880
end
7981

8082
return {measure_tarantool_metrics=measure_tarantool_metrics}

0 commit comments

Comments
 (0)