[skip ci] a couple of telemetry fixes

This commit is contained in:
Brahim Hadriche committed 2026-04-29 21:45:29 -04:00
1 parent 277c5e0562
commit 97f4a0ed61
2 files changed
+3 -4

No files matched your search

+2 -3
View File
@@ -116,8 +116,7 @@ function OnLineSysLog(event as object, dateTime as object, logsFile as string, b
return return
end if end if
httpCode = ValidInt(info.HttpCode) httpCode = ValidInt(info.HttpCode)
status = ValidString(info.Status) if httpCode >= 200 and httpCode < 300
if (httpCode >= 200 and httpCode < 300) and status = "generalsocketerror"
return return
end if end if
@@ -126,7 +125,7 @@ function OnLineSysLog(event as object, dateTime as object, logsFile as string, b
buffer.FromAsciiString(line + `\n`) buffer.FromAsciiString(line + `\n`)
buffer.AppendFile(logsFile) buffer.AppendFile(logsFile)
fingerprint = `SysLog${status}${info.LogType}${httpCode}${info.Method}` fingerprint = `SysLog${info.Status}${info.LogType}${httpCode}${info.Method}`
if ThrottleEvent("SysLogError", fingerprint, 60) if ThrottleEvent("SysLogError", fingerprint, 60)
return return
@@ -15,7 +15,7 @@ end function
function OnNodeReady() as void function OnNodeReady() as void
m.top.ObserveField("enabled", FuncName(OnEnabledChanged)) m.top.ObserveField("enabled", FuncName(OnEnabledChanged))
m.preferences.ObserveFieldScoped("dev.diagnostics.enabled", FuncName(OnPreferencesChanged)) m.preferences.ObserveFieldScoped("dev.diagnostics.enabled", FuncName(OnPreferencesChanged))
enabled = m.preferences["dev.diagnostics.enabled"] enabled = ValidBool(m.preferences["dev.diagnostics.enabled"])
OnPreferencesChanged({ OnPreferencesChanged({
enabled: enabled enabled: enabled
getData: function() as boolean getData: function() as boolean