fix(runner): record failed task attempts
This commit is contained in:
@@ -7,8 +7,12 @@ import (
|
||||
)
|
||||
|
||||
func failureTraceEntry(err error, retryable bool) map[string]any {
|
||||
return failureTraceEntryWithReason(err, retryable, "client", "client_call_failed")
|
||||
}
|
||||
|
||||
func failureTraceEntryWithReason(err error, retryable bool, scope string, reason string) map[string]any {
|
||||
info := failureInfoFromError(err)
|
||||
entry := policyTraceEntry("failure", "client", "failed", "client_call_failed", policyRuleMatch{}, info)
|
||||
entry := policyTraceEntry("failure", scope, "failed", reason, policyRuleMatch{}, info)
|
||||
entry["retryable"] = retryable
|
||||
return entry
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user