Skip to content

Commit

Permalink
FBRelayLogger: bugfixes (#250)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #250

* Dynolog is sending the wrong agent-type when gpu metrics are enabled. Agent-type is a constant string to identify the app that is collecting the metrics and it shouldn't change depending on the kind of metrics is sending.

* Dynolog is not able to send metrics if fbrelay service is restarted, that is because the socket used for the operations is broken. This fix recreates the socket if a failure to send metrics is detected.

Reviewed By: briancoutinho

Differential Revision: D56312126

fbshipit-source-id: a486f96f30e3fefdf934131df9176aafb8561ba1
  • Loading branch information
Victor Henriquez authored and facebook-github-bot committed Apr 25, 2024
1 parent c57ba0d commit a5cf5ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dynolog/src/FBRelayLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void FBRelayLogger::finalize() {
{
{"hostname", hostname_},
{"name", hostname_},
{"type", entity},
{"type", "dyno"},
{"version", "0.1.0"},
}},
{"event", {{"module", entity}}},
Expand All @@ -172,6 +172,9 @@ void FBRelayLogger::finalize() {
// try send
if (!socket->send(data.dump())) {
LOG(WARNING) << "Failed to send socket data";

// Re-init socket
initSocket();
}
}

Expand Down

0 comments on commit a5cf5ab

Please sign in to comment.