Skip to content

Audit log, metrics, and slow-query diagnostic boundaries #4332

Description

@Widthdom

Context

Dogfooding the locally built cdidx surfaced enough logging and metrics touchpoints to justify a focused audit. These paths can affect support-safe diagnostics, local privacy, retention behavior, and performance investigations.

Representative search inventory:

dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll search CDIDX_LOG --format count --limit 100
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll search GlobalToolLog --format count --limit 100
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll search CDIDX_METRICS --format count --limit 100
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll search SlowQuery --format count --limit 100
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll search LogRetention --format count --limit 100
dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll search LogRotation --format count --limit 100

Observed baseline:

  • CDIDX_LOG: 12 hits.
  • GlobalToolLog: 87 hits.
  • CDIDX_METRICS: 21 hits.
  • SlowQuery: 12 hits.
  • LogRetention: 0 hits.
  • LogRotation: 0 hits.

Audit questions

  • Are log paths, file modes, and fallback paths consistent across global-tool, workspace, and test execution?
  • Do logs and metrics avoid leaking secrets, raw environment values, full user paths, request payloads, or plugin/hook diagnostics beyond support-safe bounds?
  • Is retention/rotation behavior explicit enough for long-running MCP, watch, and repeated CLI use?
  • Are slow-query diagnostics bounded, redacted, and actionable without requiring users to share a full local DB or verbose environment dump?

Acceptance criteria

  • Logging and metrics outputs have clear redaction and support-safety boundaries.
  • Long-running or repeated invocations do not grow logs unbounded without documented cleanup guidance.
  • Slow-query diagnostics are useful for performance triage while avoiding sensitive local data exposure.
  • Tests cover representative CLI and MCP-adjacent logging paths where feasible.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions