http client telemetry fix

This commit is contained in:
Brahim Hadriche committed 2026-07-30 15:30:54 -04:00
1 parent f29b0f0af8
commit 7286c099a0
3 files changed
+13 -5

No files matched your search

@@ -471,7 +471,15 @@ namespace HttpClient
backoffMs = 1000 + Rnd(2000)
tryNumber = m._tryCount - triesLeft + 1
LogWarnNoTelemetry("Request failed ID:", m.urlTransfer.GetIdentity(), "ErrorMessage:", response.ErrorMessage(), `\nRetrying: (`, tryNumber, "/", m._tryCount, ") in", backoffMs, "ms")
LogWarnTelemetry(response.ErrorMessage() + `\n` + m.ToCurlCommand())
LogTelemetryEvent({
level: "warning"
message: response.ErrorMessage()
attachments: [{
filename: "request.txt"
content_type: "text/plain"
data: m.ToCurlCommand()
}]
})
if IsFunction(m._retryCallback)
try
-4
View File
@@ -33,10 +33,6 @@ function LogTelemetryEvent(event as object)
m.global.telemetry.LogEvent = event
end function
function LogWarnTelemetry(message as string)
m.global.telemetry.LogWarn = message
end function
function ToString(value as dynamic) as string
if getInterface(value, "ifString") <> invalid
return value