Skip to content

telemetry [14]: report CLI and reboot command failures - #891

Draft
bfjelds (bfjelds) wants to merge 3 commits into
user/bfjelds/mjolnir/command-error-metricfrom
user/bfjelds/mjolnir/telemetry-cli-command-errors
Draft

bfjelds (bfjelds) wants to merge 3 commits into
user/bfjelds/mjolnir/command-error-metricfrom
user/bfjelds/mjolnir/telemetry-cli-command-errors

Conversation

@bfjelds

@bfjelds bfjelds (bfjelds) commented Oct 26, 2026 •

Copy link
Copy Markdown
Member

Description

Wrap CLI servicing and CLI/daemon reboot paths in command-error reporting; retain existing exit behavior.

Rationale

Extracted from #778 to make the telemetry stack easier to review. Combined changes are unchanged.

Validation

Source Command or check Result Notes
Agent cargo test --locked --manifest-path /home/bfjelds/mjolnir-sandbox/trident-telemetry-split778-20261025-1743/Cargo.toml -p trident -p osutils -p trident_api --features trident/grpc-preview,trident/dangerous-options,trident_api/documentation -- command_kind:: logging:: cli:: engine::context:: config::host::tests virt:: Passed 115 targeted unit tests; run from /home/bfjelds/mjolnir-sandbox.
Agent Git tree comparison Passed Final split tip exactly matches original #778; restacked #779/#781 trees unchanged.
Agent VM functional tests Not run Require a VM; only host-safe unit tests were run.
CI Pipeline checks Not run Not evaluated as part of this split; results above are local.

Related PRs in stack:

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@bfjelds
bfjelds (bfjelds) force-pushed the user/bfjelds/mjolnir/telemetry-cli-command-errors branch from cbd7b3b to 95fdfb5 Compare October 26, 2026 01:33
@bfjelds bfjelds (bfjelds) changed the title telemetry: report CLI and reboot command failures telemetry [14]: report CLI and reboot command failures Oct 26, 2026
@bfjelds
bfjelds (bfjelds) requested a balanced review from Copilot October 26, 2026 01:44

Copilot AI 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.

🟡 Changes recommended

CLI reboot failure events are emitted after telemetry shutdown, preventing delivery to Application Insights.

1 open issue
What changed in this PR

Extends the command-error helpers from #778 to Trident’s CLI servicing and CLI/daemon reboot paths, aiming to preserve existing exit behavior.

Changes:

  • Wraps servicing and reboot operations in correlated error reporting.
  • Adds a parse-only Host Configuration file helper.
  • Updates operation-context exports and explanatory comments.
File Description
crates/​trident/​src/​validation.rs Adds a parse-only configuration file helper.
crates/​trident/​src/​server/​mod.rs Reports structured daemon reboot failures.
crates/​trident/​src/​main.rs Integrates CLI servicing and reboot error reporting.
crates/​trident/​src/​lib.rs Removes the run_with_operation re-export.

Review effort: Balanced

Comment thread crates/trident/src/main.rs Outdated
@bfjelds
bfjelds (bfjelds) force-pushed the user/bfjelds/mjolnir/telemetry-cli-command-errors branch from 95fdfb5 to 04e816b Compare October 26, 2026 01:53
@bfjelds
bfjelds (bfjelds) requested a balanced review from Copilot October 26, 2026 01:56

Copilot AI 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.

🟡 Changes recommended

CLI reboot failures are reported after the telemetry uploader shuts down, preventing their delivery to Application Insights.

1 open issue

Review effort: Balanced

@bfjelds
bfjelds (bfjelds) force-pushed the user/bfjelds/mjolnir/telemetry-cli-command-errors branch from 04e816b to f015992 Compare October 26, 2026 03:15
@bfjelds
bfjelds (bfjelds) requested a balanced review from Copilot October 26, 2026 03:18

Copilot AI 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.

🟢 Approval recommended

No unresolved blocking issues remain, and the non-closing flush addresses the previously reported reboot-error delivery problem with regression coverage.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@bfjelds
bfjelds (bfjelds) force-pushed the user/bfjelds/mjolnir/telemetry-cli-command-errors branch from f015992 to 67ee2dc Compare October 26, 2026 15:10
@bfjelds
bfjelds (bfjelds) force-pushed the user/bfjelds/mjolnir/telemetry-cli-command-errors branch from 67ee2dc to b27ff2c Compare October 28, 2026 00:06
@bfjelds
bfjelds (bfjelds) requested a balanced review from Copilot October 28, 2026 00:37

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the CLI and daemon telemetry changes.

No open issues 🎉

Review effort: Balanced

@bfjelds
bfjelds (bfjelds) force-pushed the user/bfjelds/mjolnir/telemetry-cli-command-errors branch from b27ff2c to 91f9454 Compare October 28, 2026 20:45
@bfjelds
bfjelds (bfjelds) requested a balanced review from Copilot October 28, 2026 20:56

Copilot AI 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.

🟢 Approval recommended

No active review issues are recorded for the command-error reporting changes.

No open issues 🎉

Review effort: Balanced

@bfjelds
bfjelds (bfjelds) force-pushed the user/bfjelds/mjolnir/telemetry-cli-command-errors branch from 91f9454 to 2e87e6d Compare October 28, 2026 21:58
@bfjelds
bfjelds (bfjelds) requested a balanced review from Copilot October 28, 2026 22:05

Copilot AI 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.

🟢 Approval recommended

No active review issues remain for the telemetry command-error reporting changes.

No open issues 🎉

Review effort: Balanced

bfjelds (bfjelds) and others added 3 commits October 28, 2026 22:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d0e7cadc-8f44-443f-affe-6ce8e856a218

Copilot-Session: 43cb811b-f191-4d90-852f-e3373041ca11
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 43cb811b-f191-4d90-852f-e3373041ca11
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 43cb811b-f191-4d90-852f-e3373041ca11
@bfjelds
bfjelds (bfjelds) force-pushed the user/bfjelds/mjolnir/telemetry-cli-command-errors branch from 2e87e6d to 8e0a9a3 Compare October 28, 2026 22:58
@bfjelds
bfjelds (bfjelds) requested a balanced review from Copilot October 28, 2026 23:03

Copilot AI 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.

🟢 Approval recommended

There are no active review issues for the CLI and daemon error-reporting changes.

No open issues 🎉

Review effort: Balanced

This branch has not been deployed

No deployments
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.

2 participants