fix(agent): jason-safe error entries + correct handle_info return
Errors produced by Collectors.Host were keyword tuples {:tag, msg}, which
Jason cannot encode — metric push crashed the channel. Convert them to
plain maps with :tag and :message fields.
Reporter.handle_info/2 returned {:ok, socket}, which Slipstream rejects
(GenServer-style {:noreply, socket} is the only valid return for that
callback, unlike handle_connect/handle_join/handle_disconnect).
This commit is contained in:
parent
bfe39e71e1
commit
4f82701956
2 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ defmodule ProxmoxAgent.Collectors.Host do
|
|||
try do
|
||||
{fun.(), nil}
|
||||
rescue
|
||||
e -> {fallback, {tag, Exception.message(e)}}
|
||||
e -> {fallback, %{tag: Atom.to_string(tag), message: Exception.message(e)}}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue