in src/Library/HeartbeatCustomizer.cs [22:59]
public bool UpdateClusterId(string clusterId)
{
bool sent = false;
// we don't want to throw here, just log. thus in case of empty cluster id in the message message we don't want to throw, but we will log it
try
{
if (String.IsNullOrEmpty(clusterId))
{
throw new ArgumentNullException("clusterId");
}
if (heartbeatModule != null)
{
try
{
heartbeatModule.AddHeartbeatProperty("clusterID", clusterId, true);
}
catch (Exception)
{
// we already added it before , thus updating the value of the field
heartbeatModule.SetHeartbeatProperty("clusterID", clusterId);
}
Diagnostics.LogInfo(FormattableString.Invariant($"sent update with cluesterid: {clusterId}"));
sent = true;
}
else
{
Diagnostics.LogInfo(FormattableString.Invariant($"unable to send clusterId, no telemetry module detected"));
}
}
catch (Exception e)
{
// unexpected exception occured
Diagnostics.LogError(FormattableString.Invariant($"Unknown exception while pushing event . {e.ToString()}"));
}
return sent;
}