Skip to content

Commit

Permalink
Send Failure Log Enhancement (#16203)
Browse files Browse the repository at this point in the history
Include submitted report IDs in send failure log message
  • Loading branch information
arnejduranovic authored Oct 15, 2024
1 parent 031c752 commit 6727053
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion prime-router/src/main/kotlin/azure/SendFunction.kt
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,12 @@ class SendFunction(
val randomSeconds = Random.nextInt(ditherRetriesInSec * -1, ditherRetriesInSec)
val nextRetryTime = OffsetDateTime.now().plusSeconds(waitMinutes * 60 + randomSeconds)
val nextRetryToken = RetryToken(nextRetryCount, nextRetryItems)
val submittedReportIds = workflowEngine.reportService.getRootReports(report.reportId).map {
it.reportId
}
val msg = "Send Failed. Will retry sending report: $report.reportId to ${receiver.fullName}" +
" in $waitMinutes minutes and $randomSeconds seconds at $nextRetryTime"
" in $waitMinutes minutes and $randomSeconds seconds at $nextRetryTime." +
" Corresponding submitted ReportIds: $submittedReportIds"
logger.warn(msg)
actionHistory.setActionType(TaskAction.send_warning)
actionHistory.trackActionResult(msg)
Expand Down

0 comments on commit 6727053

Please sign in to comment.