Repository navigation
Telemetry payload v3: clear failures, complete data - #175
Merged
Merged
Conversation
1-3 told the reader to look at the output; 64 and 115 described what the engine and scripts no longer use them for.
error_message, error_step, error_phase and failed_function travel as their own fields. The trace holds the failing command's output or the failing step's log lines with package and download progress removed, and IPv4 anonymisation no longer eats version numbers. A helper's "return N" is replaced by the call that failed, and a silent() failure a helper passed up keeps its capture. Tool and add-on runs use the same payload.
The container now also loads the exit code table and the log filter, so error_handler drops its own copy of the table. Sourcing the files by path lets the error handler read a failing line back.
…-install race A detached install that wrote .done just before exiting was reported as a lost exit code. The recovery menu checks the failing step's output instead of the whole run. Incus no longer opts a container into telemetry when the host value is unset, and a missing exit code is 199 on both hosts.
get_active_logfile returned a new file per call, so VM failures carried no output. msg_* now log steps, silent() writes a capture, and the error handlers record command, line and function before reporting.
…ntainer prefetch The new explanation returned from inside case and loop blocks; with errtrace on and the engine sourced from a pipe, bash lost track of its function contexts and the container's failure was never written. lxc-attach also carried the host's engine directory into the container, which skipped the container's own prefetch.
A run that stopped at the storage, ID or template checks sent nothing, because a terminal status without an install record was dropped. Such a failure now sends the install record first; cancelled dialogs and update runs still send nothing. Exit 64 counts as a configuration problem.
The keystroke reaches the program in the foreground, which exits with its own code; bash then never runs the INT trap, and the run was reported as an APT failure.
Contributor
Try this branchThe engine and the scripts resolve independently, so a production script can COMMUNITY_SCRIPTS_CORE_URL=https://raw.githubusercontent.com/community-scripts/core/feat/telemetry-v3 \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh)"Swap This PR touches both backends. Worth running on a Proxmox VE and an Incus host. Run a script from a fork as wellcurl -fsSL https://raw.githubusercontent.com/community-scripts/core/feat/telemetry-v3/tools/run.sh |
bash -s -- https://raw.githubusercontent.com/YOU/DevScripts/your-branch ct/debian.sh \
https://raw.githubusercontent.com/community-scripts/core/feat/telemetry-v3Note that Useful flags while testing
|
json_escape and friends ended with a bare return, which inside an EXIT trap returns the status from before the trap. In a VM script, whose ERR trap is inherited into functions, that fired error_handler during the final report, and every nested call reported again. The senders now run with errexit and the caller's ERR trap off, and the VM cleanup reports a failure even when the install record could not be sent.
MickLesk
marked this pull request as ready for review
October 27, 2026 13:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✍️ Description
New payload fields error_message (first msg_error of the failing step), error_step, error_phase (host/container) and failed_function; payload_version 3
The trace holds the failing command's output, or the failing step's log lines, instead of the whole-log tail; apt/dpkg/apk, download, build, pct-create and xtrace chatter is removed
IPv4 anonymisation matches four octets only, so version numbers survive
Explanations no longer say "its output says why"; they name the program (cargo exited with status 101, grep found no match, Arithmetic expression evaluated to 0)
A helper's return N is replaced by the call that failed; a silent() failure a helper passed up keeps its own command and output
The container loads api/exitcodes.func and api/errorlog.func, so the fallback exit-code table in error_handler.func is gone
Fix: the container prefetch never ran, because lxc-attach carried the host's COMMUNITY_SCRIPTS_CORE_DIR into the container
Fix: a detached install that finished after a console hangup was reported as 199 (race on the .done marker)
Fix: Ctrl-C during apt was reported as APT error 100; it is now 130 and counts as aborted
Fix: host checks that fail before the install record (storage, ID, template) are now reported
Fix: VM runs get one log and a capture, so VM failures carry output; VM cleanup reports even when the install record could not be sent
Fix: a bare return inside the EXIT trap re-entered the error handler in VM scripts and looped; the senders run with errexit and the ERR trap off
TELEMETRY_URL and TELEMETRY_PAYLOAD_VERSION reach the container; Incus no longer defaults DIAGNOSTICS to yes; a missing exit code is 199 on both hosts
Tests: new tests/telemetry-trace.sh, exit-code-hints and stale-silent-record extended; api/API.txt and ui/API.txt regenerated
Tested live on PVE 9.2 (x86) and Incus 7.5 (arm64): success, apt, plain command, missing command, helper return, release download, substitution, missing input, storage check, console hangup, Ctrl-C, VM error paths
🔗 Related Issue
Fixes #
✅ Prerequisites (X in brackets)
API.txtwas updated to match.🤖 AI Assistance (X in brackets)
🛠️ Type of Change (X in brackets)
README,docs/,CONTRIBUTING.md, or other docs.