Skip to content

Extend search timing observability to node, search, and ssh commands #117

@nikhil2611

Description

@nikhil2611

Epic

Part of Crawl Track backlog epic.

Background

Ex9 (Observability) added a Process::CLOCK_MONOTONIC timing hook only to knife status. The same pattern should be applied to other high-latency commands.

Code Paths

  • lib/chef/knife/status.rb:66 — reference implementation (timing around q.search)
  • lib/chef/knife/search.rb#run method wraps Chef::Search::Query
  • lib/chef/knife/node_list.rb — iterates all nodes via server API
  • lib/chef/knife/ssh.rb — search + SSH fanout

Acceptance Criteria

  • knife search logs: knife search: query returned N result(s) in Xs
  • knife node list logs: knife node list: fetched N node(s) in Xs
  • knife ssh logs: knife ssh: search returned N node(s) in Xs
  • Log level is Chef::Log.info (same as status hook)
  • New specs verify log output for each command

Dependencies

  • Depends on: Ex9 observability hook (already merged)
  • Blocks: nothing

Estimated Size

Small–Medium — one PR per command

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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