Collect kernel diagnostics¶
What you will end up with¶
A status snapshot from a project runtime's kernel, and time-boxed trace, capability trace or worker logs enabled on it when the snapshot is not enough.
A kernel runs with a project runtime, so these commands apply from the first deployment onwards. Day 0 ends at a verified enrollment, and this is the check that proves the node-to-kernel lane works end to end.
Prerequisites¶
- A deployed project runtime, so
<project_name>and<version>exist. - An actor with access to the workspace holding it.
1. Take a status snapshot¶
The command issues an operator intent that the owning node carries to the kernel
over the control lane as runtime.status.snapshot. A snapshot returning at all
proves the lane: the node holds the ownership lease, both ends presented
accepted identities, and the trust bundle digests agreed.
Exit gate. The snapshot returns. A refusal names which admission check rejected the call.
| Refusal | Meaning |
|---|---|
peer_identity_rejected |
The certificate does not match the expected SPIFFE name |
trust_bundle_digest mismatch |
The caller is outside the kernel's accepted trust revision |
stale_fence |
The caller holds an ownership fence that has been superseded |
runtime_session_non_owner |
The caller is not the current owner of this runtime |
runtime_session_not_found |
No such runtime session exists |
unsupported_on_operator_lane |
The operation is not admissible on this lane |
unsupported_operator_command |
The command is outside the allowlist |
Those refusals are terminal and are not retried. See Component topology.
2. Read the current diagnostics state¶
{
"contract_version": "...",
"trace": { "enabled": false, "expires_at": "" },
"captrace": { "enabled": false, "capabilities": [], "expires_at": "" },
"workerlogs": { "enabled": false, "expires_at": "" }
}
Three scopes, each independently enabled and each carrying its own expiry.
3. Enable a scope for a bounded window¶
Every scope is enabled with a TTL in seconds, so collection stops on its own.
Capability trace additionally takes the capability to scope to, so tracing stays narrow:
| Scope | Command | Extra argument |
|---|---|---|
trace |
xratu kernel trace enable |
|
captrace |
xratu kernel captrace enable |
The capability token |
workerlogs |
xratu kernel workerlogs enable |
Expected state. The scope reports enabled with an expiry ahead of now:
4. Reproduce, then collect¶
Diagnostics are emitted as the runtime works, so the window has to cover a reproduction. The kernel pushes them to its owning node on the control lane's continuity stream, and the node reports them under the observability boundary: bodies to your bucket, metadata to the control plane. See Payload storage.
5. Disable when finished¶
xratu kernel trace disable ${PROJECT} ${VERSION}
xratu kernel captrace disable ${PROJECT} ${VERSION}
xratu kernel workerlogs disable ${PROJECT} ${VERSION}
Exit gate. Each scope reports disabled:
xratu kernel diagnostics get ${PROJECT} ${VERSION} \
| jq -e '.trace.enabled == false' >/dev/null && echo "trace off"
A scope left enabled expires at its TTL, so disabling is how a window is ended early rather than the only way it ends.
When it fails¶
| Symptom | Cause | Fix |
|---|---|---|
runtime_session_not_found |
The project version has no deployed runtime | Deploy it, or check the version |
runtime_session_non_owner |
Another node holds the lease | Read current ownership before commanding |
stale_fence |
Ownership moved after the caller read it | Re-read and retry against the new owner |
peer_identity_rejected |
The kernel's provisioned identity and the presented certificate differ | Node attestation |
trust_bundle_digest mismatch |
The node's bundle is outside the runtime's accepted set | Trust bundles and revisions |
| The command times out with no refusal | The node never reached the kernel | The control lane path, not admission |
| A scope reports enabled and nothing is collected | The window closed before a reproduction | Re-enable with a longer TTL |
What changed¶
One runtime emitted diagnostics for the length of the TTL, and the scope is now disabled.