c8d: Send image delete metrics to prometheus
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
This commit is contained in:
parent
0ce714a085
commit
1cfd763214
1 changed files with 8 additions and 1 deletions
|
@ -55,7 +55,14 @@ import (
|
|||
// conflict will not be reported.
|
||||
//
|
||||
// TODO(thaJeztah): image delete should send prometheus counters; see https://github.com/moby/moby/issues/45268
|
||||
func (i *ImageService) ImageDelete(ctx context.Context, imageRef string, force, prune bool) ([]imagetypes.DeleteResponse, error) {
|
||||
func (i *ImageService) ImageDelete(ctx context.Context, imageRef string, force, prune bool) (response []imagetypes.DeleteResponse, retErr error) {
|
||||
start := time.Now()
|
||||
defer func() {
|
||||
if retErr == nil {
|
||||
dimages.ImageActions.WithValues("delete").UpdateSince(start)
|
||||
}
|
||||
}()
|
||||
|
||||
var c conflictType
|
||||
if !force {
|
||||
c |= conflictSoft
|
||||
|
|
Loading…
Reference in a new issue