Skip to content

Add diagnostic logging to configure and other JSONRPC handlers #360

@karthiknadig

Description

@karthiknadig

Problem

When PET receives a configure request, there is no logging to indicate what it's doing. If the request takes longer than the client's 30-second timeout (e.g., due to expensive glob expansion of patterns like **/.venv), the client kills PET with zero diagnostic information about where PET got stuck.

From the user's perspective, the logs show:

[info] configure: Sending configuration update: {...}
... 28 seconds of silence ...
[warning] Configure request timed out, killing hung process for restart

Proposed Fix

Add info!/trace! logging at key points in handle_configure and other JSONRPC handlers to provide visibility:

  • When configure is received
  • Before/after glob expansion (the likely slow operation)
  • When configure completes (with elapsed time)
  • Similar gaps in other handlers

Also move glob expansion outside the write lock to avoid blocking readers during slow filesystem traversal.

Related: #357

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