Open
Conversation
This change was automatically generated by the documentation agent team in response to issue #24139. 🤖 Generated with cagent
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
|
@thaJeztah Could you PTAL? |
VictorEngmarkHexagon
approved these changes
Feb 16, 2026
dvdksn
requested changes
Mar 9, 2026
Contributor
There was a problem hiding this comment.
I asked opus to review this PR against moby source code and here's what it had to say:
Thanks for working on this — documenting Prometheus metrics is valuable. I cross-referenced the metrics descriptions against the moby/moby source code and found several inaccuracies that need to be fixed before this can be merged.
Incorrect label references (engine metrics)
engine_daemon_container_actions_seconds: The description says "start, stop, create, etc." but the actual labels in the source are:start,changes,commit,create,delete. There is nostoplabel. (source:daemon/internal/metrics/metrics.go:56-64)engine_daemon_network_actions_seconds: The description says "create, connect, disconnect, etc." but the actual labels used in the source are:update,allocate,connect,release. There is nocreateordisconnectlabel. (source:daemon/container_operations.go)engine_daemon_events_total: The description says "Labels indicate the event action and type" but this is a plain counter with no labels. It's defined asmetricsNS.NewCounter("events", "The number of events logged"). (source:daemon/internal/metrics/metrics.go:49)
Inaccurate descriptions (swarm metrics)
swarm_dispatcher_scheduling_delay_seconds: PR says "Time from task creation to scheduling decision." The source help text says: "Scheduling delay is the time a task takes to go from NEW to RUNNING state." — this measures the full NEW→RUNNING duration, not just scheduling. (source:vendor/.../dispatcher/dispatcher.go:74-75)swarm_raft_snapshot_latency_seconds: PR says "Time taken to create and restore Raft snapshots." The source says "Raft snapshot create latency." — "restore" is not part of this metric. (source:vendor/.../raft/storage.go:26-27)swarm_raft_transaction_latency_seconds: PR says "Time taken to commit Raft transactions. Measures consensus performance." The source just says "Raft transaction latency." The additions ("commit", "consensus performance") are not grounded in the source. (source:vendor/.../raft/raft.go:207)swarm_store_lookup_latency_seconds: PR says "Time taken for lookup operations in the swarm store." The source help text is "Raft store read latency." (source:vendor/.../store/memory.go:105-106)swarm_store_memory_store_lock_duration_seconds: PR says "Duration of lock acquisitions in the memory store." The source says "Duration for which the raft memory store lock was held." These are different things — acquisition time vs. hold duration. (source:vendor/.../store/memory.go:109-110)
Missing metrics
The following metrics exist in the source but are not documented in the PR:
engine_daemon_image_actions_seconds(Histogram) — "The number of seconds it takes to process each image action", labels:delete,push,history,pullengine_daemon_health_check_start_duration_seconds(Histogram) — "The number of seconds it takes to prepare to run health checks"swarm_node_info(LabeledGauge) — "Information related to the swarm", labels:swarm_id,node_id
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added comprehensive documentation of Docker Prometheus metrics including descriptions, types, and usage examples.
Changes
Fixes #24139
Fixes #19759
🤖 Generated with cagent