8000 feat(otel): a span on the ten error-returning entry points the instrumentation scan found by bryan-minimal · Pull Request #2763 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

feat(otel): a span on the ten error-returning entry points the instrumentation scan found - #2763

Merged
bryan-minimal merged 1 commit into
mainfrom
otel/2449-instrument-gaps
Nov 3, 2026
Merged

bryan-minimal merged 1 commit into
mainfrom
otel/2449-instrument-gaps

Conversation

@bryan-minimal
@bryan-minimal bryan-minimal commented Oct 30, 2026 •
Copy link
Copy Markdown
Member

minimal#2449 (advisory): the graph loader (load, load_idx, load_toplevels), the sandbox's
start gate and rootfs setup (hold_start, new), the diagnostics bundle's process table
(process_tree, all_processes, proc_table_text) and the graph wire writer (write_record,
write_graph) returned errors with no span of their own, so a name that does not resolve, a start
gate that wedges a launch, or a frame that fails to write had nothing in the trace to land on.
Each gets #[tracing::instrument] with err, in the pattern graph/planner.rs already uses: the
entry points at info, the per-item helpers at debug, the per-frame writer at trace, all skip_all
(a payload is not a span field). diagnostics gains the tracing dependency it lacked.

Closes #2449

Clippy clean; graph, sandbox and diagnostics tests pass on anvil (the one failure there is the box's known root-capabilities integration test). Prepush mirror: job 01478.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Improvements
    • Diagnostic logs now provide more visibility into process discovery, graph loading and writing, and sandbox startup.
    • Tracing includes error details for these operations, helping make failures easier to identify.

…mentation scan found

minimal#2449 (advisory): the graph loader (`load`, `load_idx`, `load_toplevels`), the sandbox's
start gate and rootfs setup (`hold_start`, `new`), the diagnostics bundle's process table
(`process_tree`, `all_processes`, `proc_table_text`) and the graph wire writer (`write_record`,
`write_graph`) returned errors with no span of their own, so a name that does not resolve, a start
gate that wedges a launch, or a frame that fails to write had nothing in the trace to land on.
Each gets `#[tracing::instrument]` with `err`, in the pattern `graph/planner.rs` already uses: the
entry points at info, the per-item helpers at debug, the per-frame writer at trace, all `skip_all`
(a payload is not a span field). diagnostics gains the tracing dependency it lacked.

Closes #2449

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner October 30, 2026 20:29
@coderabbitai
coderabbitai Bot commented Oct 30, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 59296ef2-084e-4c9e-a100-1418a0a4b512
Commits

Reviewing files that changed from the base of the PR and between 30c43a1 and b1e9892.

Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
Files selected for processing: 5
  • crates/diagnostics/Cargo.toml
  • crates/diagnostics/src/procs.rs
  • crates/graph/src/loader.rs
  • crates/graph/src/wire.rs
  • crates/sandbox/src/lib.rs

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review.

Walkthrough

Tracing instrumentation was added to diagnostics, graph, and sandbox functions. The annotations use different levels and skip argument capture. Error-returning functions record errors.

Changes: Tracing Instrumentation

Layer / File(s) Summary
Instrument process diagnostics
crates/diagnostics/Cargo.toml, crates/diagnostics/src/procs.rs
The diagnostics crate adds the workspace tracing dependency. Instrumentation was added to process_tree, all_processes, and Linux proc_table_text.
Instrument graph loading and writing
crates/graph/src/loader.rs, crates/graph/src/wire.rs
Instrumentation was added to Loader::load, Loader::load_idx, Loader::load_toplevels, write_record, and write_graph. The annotations use debug, info, or trace level and record errors.
Instrument sandbox setup
crates/sandbox/src/lib.rs
Info-level instrumentation was added to Sandbox::hold_start and Sandbox::new. Both annotations record errors.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature · Severity of issue fixed: Low

Suggested reviewers: norrietaylor

Merge Risk: Minimal · up to b1e98

No actionable merge-blocking risk remains from this instrumentation-only change.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the primary change: adding OpenTelemetry spans to ten error-returning entry points. It is specific and related to the changeset, although somewhat long.
Description check Passed The description provides a detailed summary, identifies the linked issue, and reports testing results. It does not include the template's explicit Checklist section, but the missing checklist is non-c…
Linked Issues check Passed The pull request addresses all ten coding objectives in directly linked issue #2449. It adds #[tracing::instrument] with err and skip_all to Loader::load, load_idx, load_toplevels, `Sandbo…
Out of Scope Changes check Passed The reviewed changes are limited to the ten functions named by issue #2449 and the required tracing dependency in crates/diagnostics/Cargo.toml. The summaries report no behavior or public API chan…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Description check

Explanation

The description provides a detailed summary, identifies the linked issue, and reports testing results. It does not include the template's explicit Checklist section, but the missing checklist is non-critical because the required summary and testing information are present.

Full details: Linked Issues check

Explanation

The pull request addresses all ten coding objectives in directly linked issue #2449. It adds #[tracing::instrument] with err and skip_all to Loader::load, load_idx, load_toplevels, Sandbox::hold_start, Sandbox::new, process_tree, all_processes, proc_table_text, write_record, and write_graph. The reported levels match the issue: loader helpers use debug, entry points use info, and write_record uses trace. The diagnostics crate also adds its required tracing dependency.

Full details: Out of Scope Changes check

Explanation

The reviewed changes are limited to the ten functions named by issue #2449 and the required tracing dependency in crates/diagnostics/Cargo.toml. The summaries report no behavior or public API changes. No unrelated implementation change is identified.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 9 functions across 4 files. (1 skipped: 1 unsupported.)

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit hops beside the logs,
New spans mark paths through fields and fog.
Errors leave a trace behind,
While quiet arguments stay confined.
The burrow hums with signals bright.

Comment @coderabbitai help to get the list of available commands.

@minimal-foundry
minimal-foundry Bot commented Oct 30, 2026 •
Copy link
Copy Markdown
< 8000 /details>
Contributor

Approved: no findings at b1e989269757.

Nothing to do.

Clobber: none seen.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 30, 2026
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every new span uses skip_all, and none of the recorded errors carry anything sensitive. CI is green.

Non-blocking (low):

  • graph/src/loader.rs:45,59,84: err(Debug) on the mutually recursive load / load_idx / load_toplevels emits an ERROR at every level of the recursion. One missing upstream package makes mip build print about five ERROR graph::loader: error=NoSuchPkg {..} lines ahead of its own error, more for deeper chains, since mip's stderr filter is info. Keep err only on load_toplevels, or use err(level = "debug", Debug) on the inner two.
  • graph/src/wire.rs:248,266: these spans are on the sync GraphWriter, which only tests and fuzzing reach. The production path, AsyncGraphWriter (wire.rs:748-769, used by remote-client/src/lib.rs:94,286), still has no span.
  • diagnostics/src/procs.rs:103,149,180: collect_step! already records these failures. With err added, minimald reports a /proc failure three times, and min bug now prints an ERROR on the terminal for a host process_tree failure that used to be silent.
  • Nit: diagnostics/Cargo.toml:11 puts tracing above anyhow, out of alphabetical order.

Separately, the PR body says this follows a pattern in graph/planner.rs, but planner.rs:296,305 use a bare #[tracing::instrument] with no skip_all and no err.

@bryan-minimal
bryan-minimal added this pull request to the merge queue Nov 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 3, 2026
@bryan-minimal
bryan-minimal added this pull request to the merge queue Nov 3, 2026
Merged via the queue into main with commit 628f0d9 Nov 3, 2026
35 checks passed
@bryan-minimal
bryan-minimal deleted the otel/2449-instrument-gaps branch November 3, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[otel-rust] 10 instrumentation gaps in 4 files (advisory)

2 participants

0