Skip to content

Walk Track: Extend debug-level timing instrumentation to search, node_list, ssh #142

@nikhil2611

Description

@nikhil2611

Context

Walk Ex9 added Chef::Log.debug("op=knife_...")) timing to knife status and knife node show. Three high-usage commands remain uninstrumented: search, node list, and ssh.

Code Paths

  • lib/chef/knife/search.rb — wrap search call with CLOCK_MONOTONIC
  • lib/chef/knife/node_list.rb — wrap list query
  • lib/chef/knife/ssh.rb — wrap SSH session setup

Acceptance Criteria

  • Each command emits Chef::Log.debug("op=knife_<cmd> status=ok elapsed_ms=N") after main I/O
  • One new spec per command asserting Chef::Log.debug called with the timing pattern
  • cookstyle passes; existing specs remain green
  • ai-track-docs/observability.md updated

Dependencies

Walk Ex9 timing pattern (merged). No blocking deps.

Size

Small — one PR covering all three commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions