Skip to main content

Module envelope

Module envelope 

Source
Expand description

Install identity and the constant half of the batch envelope.

Structs§

InstallId
The on-disk install identity.
TelemetryState
Per-machine telemetry bookkeeping. Never contains anything about the user’s work — only what this crate needs to avoid re-reporting an install and to rate-limit its own flushes.

Constants§

ROTATION_DAYS
How long an install id may live before it is replaced.

Functions§

current_arch
The CPU family, mapped onto the closed whitelist.
current_libc
The libc this binary was compiled against.
current_os
The OS family this binary is running on, mapped onto the closed whitelist.
current_tty
Whether both stdin and stdout are terminals.
now_rfc3339
RFC3339 UTC at second precision. The only timestamp this crate produces, and it is per-batch: individual events carry no timestamps at all.
read_or_create_install_id
Read the install id, minting a fresh one if it is missing, unreadable, not a UUID, or older than ROTATION_DAYS.
read_state
Read state.json, or a default when it is missing or unreadable.
reduce_panic_site
Reduce a panic location to something that is safe to send.
release_build_sha
The build sha of a release-CI binary, or None.
short_hex_sha
Reduce a full sha to the first 12 lowercase hex characters, rejecting anything that is not a sha.
write_state
Write state.json.