Skip to content

Commit

Permalink
fix(docker): use a more concrete reason for when the cache is empty (#…
Browse files Browse the repository at this point in the history
…893)

Docker triggers might not send an event to echo if the cache was empty (e.g. instance just came)
Adding a reason to event to metric for this case
  • Loading branch information
marchello2000 authored Oct 16, 2020
1 parent 366892d commit a4b66aa
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ class DockerMonitor extends CommonPollingMonitor<ImageDelta, DockerPollingDelta>
if (sendEvents && item.sendEvent) {
postEvent(delta.cachedImages, item.image, item.imageId)
} else {
if (!sendEvents) {
registry.counter(missedNotificationId.withTags("monitor", getName(), "reason", "fastForward")).increment()
} else {
registry.counter(missedNotificationId.withTags("monitor", getName(), "reason", "skippedDueToEmptyCache")).increment()
}
}
}
}
Expand Down

0 comments on commit a4b66aa

Please sign in to comment.