Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/mobyPublic

Comments

metrics: add success/failure counters for image deletion#52070

Open
htoyoda18 wants to merge 1 commit intomoby:masterfrom
htoyoda18:feature/add-metrict
Open

metrics: add success/failure counters for image deletion#52070
htoyoda18 wants to merge 1 commit intomoby:masterfrom
htoyoda18:feature/add-metrict

Conversation

@htoyoda18
Copy link
Contributor

@htoyoda18htoyoda18 commentedFeb 20, 2026
edited
Loading

- What I did

Added Prometheus counters to track image deletion success and failures. This complements the timer metrics added in#47555 by providing counters for monitoring deletion operations.

- How I did it

  • Added two new metrics indaemon/internal/metrics/metrics.go:
    • ImageDeletesCounter: Tracks successful deletions
    • ImageDeletesFailedCounter: Tracks failed deletions with categorized reasons
  • Updated both containerd (daemon/containerd/image_delete.go) and graphdriver (daemon/images/image_delete.go) backends
  • Created error categorization function that classifies failures into:not_found,conflict,permission_denied,invalid_argument, orunknown
  • Added unit tests for error categorization in both backends

- How to verify it

  1. Start Docker daemon with Prometheus metrics enabled
  2. Perform image deletion operations (both successful and failing cases)
  3. Check metrics endpoint (typicallyhttp://localhost:9323/metrics):
    # Successful deletionengine_daemon_image_deletes_total# Failed deletions by reasonengine_daemon_image_deletes_failed_total{reason="conflict"}engine_daemon_image_deletes_failed_total{reason="not_found"}
  4. Run unit tests:go test ./daemon/containerd/... ./daemon/images/... -run TestCategorizeImageDeleteError

- Human readable description for the release notes

Add Prometheus counters for image deletion operations (`engine_daemon_image_deletes_total` and`engine_daemon_image_deletes_failed_total{reason}`) to track success/failure rates and categorize deletion errors.

- A picture of a cute animal (not mandatory but encouraged)

🐳

Add Prometheus counters to track image deletion success and failures.Complements the timer metrics added inmoby#47555.Introduces two new metrics:- engine_daemon_image_deletes_total- engine_daemon_image_deletes_failed_total{reason}Failure reasons are categorized as: not_found, conflict,permission_denied, invalid_argument, or unknown.Signed-off-by: hiroto.toyoda <hiroto.toyoda@dena.com>
@github-actionsgithub-actionsbot added area/testing area/imagesImage Distribution area/daemonCore Engine containerd-integrationIssues and PRs related to containerd integration labelsFeb 20, 2026
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

area/daemonCore Enginearea/imagesImage Distributionarea/testingcontainerd-integrationIssues and PRs related to containerd integration

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@htoyoda18

[8]ページ先頭

©2009-2026 Movatter.jp