feat(agent): log outgoing sample to Diagnostics before push
This commit is contained in:
parent
5a9efdd482
commit
3a32af4ff9
1 changed files with 2 additions and 0 deletions
|
|
@ -101,6 +101,8 @@ defmodule ProxmoxAgent.Reporter do
|
|||
|
||||
defp push_metric(socket, event, data) do
|
||||
payload = %{collected_at: DateTime.utc_now() |> DateTime.to_iso8601(), data: data}
|
||||
kind = String.replace_prefix(event, "metric:", "")
|
||||
ProxmoxAgent.Diagnostics.log_sample(kind, payload)
|
||||
|
||||
case push(socket, socket.assigns.topic, event, payload) do
|
||||
{:ok, _ref} ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue