fix: monitor response data format

This commit is contained in:
DDDHuang 2021-08-12 19:41:53 +08:00
parent 4bf1e83449
commit 3b52328244
1 changed files with 2 additions and 1 deletions

View File

@ -193,7 +193,8 @@ lookup(Params) ->
lookup_(lists:foldl(Fun, #{}, Params)).
lookup_(#{node := Node, counter := Counter}) ->
{200, sampling(Node, Counter)};
Data = hd(maps:values(sampling(Node, Counter))),
{200, Data};
lookup_(#{node := Node}) ->
{200, sampling(Node)};
lookup_(#{counter := Counter}) ->