Skip to content

Debug Logging for API Requests to Docker Daemon #532

@cnuss

Description

@cnuss

Feature Request

Can we extend --log-level=debug and --log-level=trace so that they do API Request logging to the underlying docker system?

Purpose

This is so we can inspect the interaction that cri-dockerd and kubelet might be making to the underlying Docker Daemon for greater debug-ability.

Debug Mode (--log-level=debug)

Return basic details about the API calls (Method, URL, Status Response)

./cri-dockerd --log-level debug

Would return basic API call introspection into Docker Socket/API calls:

time="2026-01-08T11:35:17Z" level=trace msg="(dockerapi) GET unix:///var/run/docker.sock/v1.46/version => 200 OK"

Trace Mode (--log-level=trace)

Return more verbose details about the API calls (Method, URL, Request Body, Response Body)

Would return basic API call introspection into Docker Socket/API calls:

time="2026-01-08T11:35:17Z" level=trace msg="(dockerapi) GET unix:///var/run/docker.sock/v1.46/version: (empty) => 200 OK {\"Platform\":{\"Name\":\"Docker Desktop 4.55.0 (213807)\"},\"Components\":[{\"Name\":\"Engine\",\"Version\":\"29.1.3\",\"Details\":{\"ApiVersion\":\"1.52\",\"Arch\":\"arm64\",\"BuildTime\":\"2025-12-12T14:50:40.000000000+00:00\",\"Experimental\":\"false\",\"GitCommit\":\"fbf3ed2\",\"GoVersion\":\"go1.25.5\",\"KernelVersion\":\"6.12.54-linuxkit\",\"MinAPIVersion\":\"1.44\",\"Os\":\"linux\"}},{\"Name\":\"containerd\",\"Version\":\"v2.2.0\",\"Details\":{\"GitCommit\":\"1c4457e00facac03ce1d75f7b6777a7a851e5c41\"}},{\"Name\":\"runc\",\"Version\":\"1.3.4\",\"Details\":{\"GitCommit\":\"v1.3.4-0-gd6d73eb8\"}},{\"Name\":\"docker-init\",\"Version\":\"0.19.0\",\"Details\":{\"GitCommit\":\"de40ad0\"}}],\"Version\":\"29.1.3\",\"ApiVersion\":\"1.52\",\"MinAPIVersion\":\"1.44\",\"GitCommit\":\"fbf3ed2\",\"GoVersion\":\"go1.25.5\",\"Os\":\"linux\",\"Arch\":\"arm64\",\"KernelVersion\":\"6.12.54-linuxkit\",\"BuildTime\":\"2025-12-12T14:50:40.000000000+00:00\"}\n"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions