8000 docs(reference): correct telemetry.md (guest spool, boot line, minvmd log, update key) by agent-137 · Pull Request #3882 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

docs(reference): correct telemetry.md (guest spool, boot line, minvmd log, update key) - #3882

Merged
mitodrummer merged 3 commits into
mainfrom
docs/reference-telemetry
Nov 30, 2026
Merged

mitodrummer merged 3 commits into
mainfrom
docs/reference-telemetry

Conversation

@agent-137
@agent-137 agent-137 commented Nov 29, 2026 •
Copy link
Copy Markdown
Member

Docs pass, docs/reference/telemetry.md. Docs only. Claims checked against main at b58e1f5.

Corrected

  • Guest records on the host are not in minvmd's own spool file. minvmd writes them to a
    per-VM spool, <spool>/guest/<vm>/ (mlog/src/otel.rs:163 spool_guest_line, :213
    guest_spool_dir). It stamps minimal.forwarded_by and minimal.vm
    (minvmd/src/guest_telemetry.rs:111-113), and min bug collects that directory
    (minimal/src/diag/collect.rs:484-495).
  • The VM spool bound is not shared with the host spool. Each VM's copy has its own 8 MiB bound
    and is pruned on its own (otel.rs:191 GUEST_SPOOL_MAX_BYTES;
    guest_telemetry.rs:76-89). The "fills the shared spool faster" text is gone.
  • The guest boot line carries more than the on/off switches: MINIMAL_TELEMETRY=1, the spool
    and per-signal =none switches, MINIMAL_OTEL_FILTER, the vsock forward address and
    TRACEPARENT (minvmd/src/telemetry.rs:224-262). The two places that describe it now agree.
  • minvmd.log rotates daily as minvmd.log.<date>, keeps 14 files, and is written by a
    detached minvmd run --detach (minvmd/src/lib.rs:40-66).
  • min run is not a top-level command (minimal/src/cli.rs:63-216). It is gone from the
    notice-suppressing list.
  • Update-check key for a build without a pointer is the commit hash only when the version
    holds .g<hex>, else the version itself (minimal/src/update_check/state.rs:40-45
    build_key). The install field also takes source (state.rs Install::source).
  • "No line means off": the start-up line is also missing when both signals are none and the
    spool is off (otel.rs init).

Added (gaps)

  • Troubleshooting for an endpoint that is not an absolute URL or that has a query or fragment
    (otel.rs:401, :403), and for an unrecognised *_EXPORTER value (otel.rs:964).

Cut (time-relative)

  • "Nothing uploads the spool today" is now "Nothing uploads the spool".

Verified, kept as is

All the rest, each against code. Among them: the MINIMAL_TELEMETRY values and vetoes
(mlog/src/otel/switches.rs:30-37, :220-236, :311-335), the endpoint and header precedence
and the refusal text (switches.rs:248-420, otel.rs:855-954), vsock 7353 and 64 KiB/s with a
4 MiB burst (guest_telemetry.rs:60, :90, :94), the spool path, names, rotation, 7-day and
about-46-MiB pruning and the modes (otel/spool.rs), the resource attributes, the secret
scrubbing, bundle redaction, 8000 the update-check endpoint, budget, notice and off switches, and
the exit waits.

Not code-checkable or left as is

  • The spec 25 link, OpenTelemetry library variables, the webapp worker, and the installer
    upgrade flow.
  • "About a tenth of a second" of guest clock skew. No code bound was found, so it is left as
    written.
  • Known gaps not added here, to keep the PR small: the update check's MINIMAL_UPDATE_CHECK_URL
    and --minimal-dir off switch, exporter-variable precedence, and the spool directory's
    symlink refusal.

Vale is clean on changed lines. Leaves docs/specs and the BEP docs issues alone.

🤖 Generated with Claude Code

https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g

Summary by CodeRabbit

  • Documentation
    • Updated telemetry guidance to clarify which settings are passed to guest VMs and which endpoint details are excluded.
    • Clarified how guest telemetry records are stored, collected, and independently capped and pruned.
    • Expanded troubleshooting advice for telemetry settings, exporter warnings, rotating logs, and guest telemetry counters.
    • Updated instructions for checking whether updates have been notified, including how the install source is identified.

… log, update key)

minvmd spools guest records per VM under <spool>/guest/<vm>/ with an 8 MiB bound
of their own; the boot line carries more than on/off; minvmd.log rotates daily;
min run is not a top-level command; build_key sends the version when no hash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g
@agent-137
agent-137 requested a review from a team as a code owner November 29, 2026 18:45
@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

@coderabbitai
coderabbitai Bot commented Nov 29, 2026 •
Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 59 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

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: c35bd8ae-2170-4594-a7d3-ae77b30bd65f
Commits

Reviewing files that changed from the base of the PR and between c84ceda and cb7ecda.

Files selected for processing: 1

  • docs/reference/telemetry.md

No actionable comments were generated in the recent review.

Walkthrough

This PR updates the telemetry reference. It documents guest telemetry settings and per-VM spool handling, clarifies update-check fields, and revises troubleshooting guidance for minvmd logs, exporter settings, and guest telemetry messages.

Changes: Telemetry reference

Layer / File(s) Summary
Guest telemetry and spool
docs/reference/telemetry.md
The reference describes guest kernel command-line settings, per-VM spool copies and limits, and collection with min bug. It also clarifies that spool files are not uploaded.
Update-check details
docs/reference/telemetry.md
The command example changes from min run to min. The reference explains how update-check key and install values are determined.
Telemetry troubleshooting
docs/reference/telemetry.md
The reference describes dated, rotating minvmd logs, telemetry configuration checks, endpoint and exporter warnings, and guest telemetry door messages.

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

Possibly related issues

  • gominimal/minimal#1992 — This PR updates documentation for telemetry spool handling, update-check fields, and daemon log rotation described by the issue.

Suggested reviewers: bryan-minimal

Merge Risk: Minimal · previous review 9773d

This PR only corrects the telemetry reference. The documented behavior matches the implementation that was inspected, so there is no merge-blocking risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title follows Conventional Commits (docs(reference): ...) and names the file and the kind of change. It is specific to a documentation correction, but it is broad. It does not name the main correc…
Description check Passed The description covers the corrections, the added gaps, the removed time-relative text, and the items verified or left out. It gives code references and a testing note (Vale is clean on changed lines)…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title follows Conventional Commits (docs(reference): ...) and names the file and the kind of change. It is specific to a documentation correction, but it is broad. It does not name the main corrections (guest spool, boot line, minvmd.log, update key). It is partly related to the changeset: it covers the docs fix and the file, but not the main point of the corrections.

Full details: Description check

Explanation

The description covers the corrections, the added gaps, the removed time-relative text, and the items verified or left out. It gives code references and a testing note (Vale is clean on changed lines). It does not follow the repository template: the Summary, Testing, and Checklist headings are absent, and the Checklist items (docs updated, BREAKING CHANGE footer) are not marked. The content is substantive, so the check passes, but the template structure is not followed.

Finishing Touches

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 reads the spool-file page,
And checks each VM’s allotted stage.
The logs roll by, day after day,
While endpoint notes point out the way.
The rabbit thumps: “The docs are clear!”

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: ad5f229e-10c8-4d2a-bf54-f958226acf2f
Commits

Reviewing files that changed from the base of the PR and between b58e1f5 and 9773d17.

Files selected for processing: 1

  • docs/reference/telemetry.md

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

@minimal-foundry
minimal-foundry Bot commented Nov 29, 2026 •
Copy link
Copy Markdown
Contributor

Reviewed: no findings; approval withheld, 5 threads unresolved at cb7ecda4967d.

APPROVE withheld: 5 unresolved threads — norrietaylor docs/reference/telemetry.md, norrietaylor docs/reference/telemetry.md, norrietaylor docs/reference/telemetry.md, norrietaylor docs/reference/telemetry.md, norrietaylor docs/reference/telemetry.md. Resolving the last thread releases the approval on this head.

Resolve the open threads. Resolving the last one releases the approval on this head; no new review is required.

Clobber: none seen.

@agent-137
8000
Copy link
Copy Markdown
Member Author

/arch-review

@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 Nov 29, 2026
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS · the full ruling

This head adds only a merge of main (#3880, Cargo.lock and deny.toml). The telemetry.md diff is the same as the diff at 9773d179, and that head got a PASS. The text agrees with architecture.md D9. The guest does not get your endpoint or headers, records go to a local spool, and the off switches do not change. No condition is open.

Ruled at c84ceda against gominimal/arch@d3d472929d81 by claude-opus-5-5.

@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.

Scope matches the title. The diff changes only docs/reference/telemetry.md, and each hunk traces to an item in the PR body. Clobber none found from the diff. The git log check did not run, because the shell was not available in this run. Correctness I read the code behind each corrected claim. These claims agree with the code: the per-VM guest spool path and its 8 MiB bound, the min bug collection, the boot line tokens, the minvmd.log rotation and 14 files, the removal of min run, the build_key fallback, the source install value, and the two door log messages. Four statements do not agree fully with the code: the no-line condition, the query or fragment warning, the key row for a package install, and the scope of the minimal.forwarded_by stamp. One nit covers two lines that the edit did not wrap. Not checked: gitleaks, git log and git blame (no shell), the prose lint, and the ~/.local/state/minimal state directory on macOS.

Comment thread docs/reference/telemetry.md Outdated
No line at all means telemetry is off for that process, or both signals are
`none` and the spool is off. Check `MINIMAL_TELEMETRY`, `DO_NOT_TRACK`,
`OTEL_SDK_DISABLED` and the `*_EXPORTER` variables, and for a daemon, the
environment of the command that started it.
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.

low · The no-line condition does not agree with init. Both signals set to none give no line while the spool switch is on, because a signal that is off does not spool (switches.rs:271). MINIMAL_OTEL_SPOOL=0 with no endpoint also gives no line, with both signals on. The check list omits MINIMAL_OTEL_SPOOL and the endpoint variables, so a reader in the second case finds nothing wrong. State the condition as: no signal has an endpoint and no signal spools. Add MINIMAL_OTEL_SPOOL and the endpoint variables to the list. This is one instance.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in cb7ecda: the no-line condition now reads "no signal has an endpoint and no signal spools", notes that a none signal does not spool and that MINIMAL_OTEL_SPOOL=0 with no endpoint logs no line, and the check list adds MINIMAL_OTEL_SPOOL and the *_ENDPOINT variables (crates/mlog/src/otel/switches.rs:271, spool: spool && !s.off). @norrietaylor, could you re-approve when you have a moment?

Comment thread docs/reference/telemetry.md Outdated
the warning names is not a full URL, so that signal is not exported. A base
endpoint with a query or a fragment does not export either, because the
signal path cannot go on its end. Set the variable to a URL such as
`http://localhost:4318`.
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.

low · The heading quotes one warning, and the second sentence describes a different warning without its text. A base endpoint with a query or fragment prints has a query or fragment, so the signal path cannot be appended to it, not the quoted text. A person who searches the page for that warning does not find it. Quote the second text too, in this entry or in an entry of its own. The PR body cites both constants (otel.rs:401, :403).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in cb7ecda: the query-or-fragment warning has its own entry headed with its exact text, has a query or fragment, so the signal path cannot be appended to it (crates/mlog/src/otel.rs:403, BASE_HAS_QUERY), with the remedy of removing the query or setting the per-signal endpoint, which takes a query as given. @norrietaylor, could you re-approve when you have a moment?

Comment thread docs/reference/telemetry.md Outdated
|---|---|
| channel | `stable`, `unstable`, `nightly`; `pinned` for an install made with `--version`; `source` for a binary that no install record describes (a development build, or a copy of `min` other than the one the installer put in place). Only a channel install is ever notified |
| key | the channel pointer this build was installed from, written by the installer to `<state>/minimal/install.toml`; for a build without one, the commit hash in `min version` |
| key | The channel pointer that the installer wrote to `<state>/minimal/install.toml` for this build. A build without one sends the commit hash in `min version`, or the version itself when it does not hold a hash |
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.

low · The key row names only the installer's file, then says that a build without one sends the commit hash or the version. A package install has no installer file, and read_install sends the key from the package's <prefix>/share/minimal/install.toml. The row as written says that a package install sends its commit hash. The install row two lines down already names the package file. Name it here too. The old text had the same gap, and this PR rewrote the row.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in cb7ecda: the key row now names both sources, the installer's <state>/minimal/install.toml and a package's <prefix>/share/minimal/install.toml, and falls back to the commit hash only when neither file exists (crates/minimal/src/update_check/state.rs:82, read_install). @norrietaylor, could you re-approve when you have a moment?

Comment thread docs/reference/telemetry.md Outdated
keeps its own spool on the VM's state volume as well.
`minvmd` also keeps a copy of the guest's records in a spool of its own for
each VM, `<spool>/guest/<vm>/`. `minvmd` marks each record there with
`minimal.forwarded_by=minvmd` and `minimal.vm=<vm>`. `min bug` collects that
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.

low · marks each record there limits the two attributes to the spool copy. minvmd stamps a record before it spools the record and before it batches the record for the forward. The records in your collector carry minimal.forwarded_by=minvmd and minimal.vm=<vm> too. That is the fact a person needs to tell VMs apart in the collector, and the page does not state it anywhere else. Say that both copies carry the attributes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in cb7ecda: the paragraph now says minvmd stamps each guest record before it spools or forwards it, so both the spool copy and the collector records carry minimal.forwarded_by=minvmd and minimal.vm=<vm>, and that minimal.vm tells VMs apart in the collector (crates/minvmd/src/guest_telemetry.rs:459 stamps before :473 spools and the batch push). @norrietaylor, could you re-approve when you have a moment?

Comment thread docs/reference/telemetry.md Outdated
When your sessions run in a microVM, the guest daemon gets its telemetry
settings on its kernel command line. They are `MINIMAL_TELEMETRY=1`, the
spool and per-signal off switches, your `MINIMAL_OTEL_FILTER`, the forward
address and `TRACEPARENT`. It does not get your endpoint or headers. Its records travel to `minvmd` on your machine over a
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.

nit · The edit left this line at about 118 characters, where the paragraph wraps near 76. Line 214 has the same shape after its edit. Wrap both lines again.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Addressed in cb7ecda: re-wrapped the long lines in the microVM paragraph and the kernel-command-line paragraph to the paragraph width, plus one long line my own edit left in the URL warning entry. @norrietaylor, could you re-approve when you have a moment?

…ing, key and VM stamps

State the no-line condition as no endpoint and no spool, and list
MINIMAL_OTEL_SPOOL and the endpoint variables. Quote the base-endpoint
query-or-fragment warning in its own entry. Name the package install file
in the update-check key row. Say that minvmd stamps guest records before
both the spool and the forward. Re-wrap two long lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016CYvTye6pQuxGcVPkx1r2g
@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

@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 — approval withheld

Verdict COMMENT — APPROVE withheld: 5 unresolved threads — norrietaylor docs/reference/telemetry.md, norrietaylor docs/reference/telemetry.md, norrietaylor docs/reference/telemetry.md, norrietaylor docs/reference/telemetry.md, norrietaylor docs/reference/telemetry.md. No findings.

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

@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Nov 30, 2026
@agent-137
Copy link
Copy Markdown
Member Author

/arch-review

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS · the full ruling

The change is docs only, and it conforms to D9 and AT27 of the design. The guest boot line that the doc lists carries no endpoint, header or resource attribute, as AT27 requires. The per-VM spool and the minimal.vm attribute match the code at this head. Nothing is left to do.

Ruled at cb7ecda against gominimal/arch@d3d472929d81 by claude-opus-5-5.

@mitodrummer mitodrummer 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.

Approved.

@mitodrummer
mitodrummer added this pull request to the merge queue Nov 30, 2026
Merged via the queue into main with commit 8e10edb Nov 30, 2026
40 checks passed
@mitodrummer
mitodrummer deleted the docs/reference-telemetry branch November 30, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0