Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
casimiro committed Oct 3, 2024
1 parent 563028a commit f18a110
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion kong/plugins/prometheus/wasmx.lua
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,16 @@ _M.metric_data = function()

-- delayed require of the WasmX module, to ensure it is loaded
-- after ngx_wasm_module.so is loaded.
wasmx_shm = wasmx_shm or require "resty.wasmx.shm"
if not wasmx_shm then
local ok, _wasmx_shm = pcall(require, "resty.wasmx.shm")
if ok then
wasmx_shm = _wasmx_shm
end
end

if not wasmx_shm then
return
end

wasmx_shm.metrics:lock()

Expand Down

0 comments on commit f18a110

Please sign in to comment.