diff options
author | Sebastiaan van Stijn <thaJeztah@users.noreply.github.com> | 2023-05-09 17:00:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 17:00:29 +0200 |
commit | 31b98f9502578eae4cc02c1d567c60cc326e5ab9 (patch) | |
tree | ccda8b52cb3bc0595c6cfbbb56c2976038dc1723 | |
parent | 269e55a915187bd9bf4eec22b26d00f2342f23ad (diff) | |
parent | 63640838ba6c2d41300cbe87caeb3cbbf66e410e (diff) | |
download | docker-31b98f9502578eae4cc02c1d567c60cc326e5ab9.tar.gz |
Merge pull request #45494 from thaJeztah/24.0_backport_execDuration_in_containerExit
[24.0 backport] daemon: handleContainerExit(): add execDuration in attributes
-rw-r--r-- | daemon/monitor.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon/monitor.go b/daemon/monitor.go index c307711e20..90998d4643 100644 --- a/daemon/monitor.go +++ b/daemon/monitor.go @@ -78,7 +78,8 @@ func (daemon *Daemon) handleContainerExit(c *container.Container, e *libcontaine } attributes := map[string]string{ - "exitCode": strconv.Itoa(exitStatus.ExitCode), + "exitCode": strconv.Itoa(exitStatus.ExitCode), + "execDuration": strconv.Itoa(int(execDuration.Seconds())), } daemon.Cleanup(c) |