Nimblesite / Nimblesite/Basilisk

Make LSP trace controllable: verbosity level + per-category mute (currently firehose, likely CPU cost)

Open
#85 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
54
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Summary

The LSP trace is firehose-or-nothing and far too noisy. We need granular control: a verbosity level and the ability to mute specific categories of trace output. Right now it both buries useful signal and likely wastes CPU/IO serializing megabytes of JSON.

What exists today

Only one knob: basilisk.trace.server = off | messages | verbose (vscode-extension/package.json:678-687). That's the stock vscode-languageclient toggle — all-or-nothing, and it controls only LSP message tracing, not the server's own tracing output.

The noise (observed)

  • Full publishDiagnostics payloads dumped per file — every diagnostic for every file is serialized into the trace as pretty-printed JSON, including test fixtures, build output (vscode-extension/out/...), and vendored code (debugpy/...). A single notification can be hundreds of lines.
  • High-frequency command spamexecute_command 'basilisk.profiler.processes' logs every ~2 seconds continuously while the Python Processes panel is visible (hundreds of identical lines).
  • Repeated basilisk.typeHealth, basilisk.workspaceModules, etc.

This makes the trace unreadable and is plausibly burning CPU (JSON serialization + IO on every keystroke-driven re-check across 587 files).

Requested behavior

  1. Verbosity level for the server's own logs (error | warn | info | debug | trace), surfaced as a setting (e.g. basilisk.log.level) and applied to the tracing subscriber — not just the LSP message trace.
  2. Per-category toggles / filters, e.g.:
    • diagnostics (the publishDiagnostics dumps)
    • commands (execute_command, incl. the profiler-process polling)
    • profiler / processes polling
    • workspace-scan
    • dap / debug proxy
      Allow muting categories independently (a tracing EnvFilter-style directive, or a list of enabled/disabled targets).
  3. Don't log full diagnostic payloads at info. Summarize ("published N diagnostics for ") and gate the full dump behind debug/trace.
  4. Throttle / collapse the periodic poller (profiler.processes) — don't emit an identical info line every 2s; log on change only, or at trace.

Severity

Enhancement / performance — the current trace is unusable at volume and likely costs CPU.

Related

The diagnostic-payload noise overlaps with #80 (vendored files being scanned at all). This issue is specifically about trace controllability, independent of which files are scanned.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with vscode-extension/package.json:678-687, then locate the Rust tracing subscriber and the handlers for diagnostics and profiler.processes logging. Done means server log levels and categories can be controlled independently, diagnostic traces are summarized at info, and unchanged polling does not emit repeated info lines.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, vscode
Domain
devtools, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.