Expand description
The redaction policy, rustev.redaction/1, its evaluation and the keyed
digest (spec 028, 3.3 and 3.4).
Every value a telemetry exporter writes passes Redactor::apply, and
every value a trace reader shows passes RedactionPolicy::view. Both
are pure: no I/O, no clock, no async runtime. The field names and their
class rules are the closed catalogue of crate::trace_fields.
The policy is a description of what may leave the process, never an authorization of any action (principle VI).
Structs§
- Digest
Key - The host’s digest key (3.4.5): 32 to 64 bytes, named by an opaque
key_id. It is never serialized, and itsDebugform shows only thekey_id. - Field
Override - One
fieldsoverride (3.4.1). - Redaction
Policy - A redaction policy,
rustev.redaction/1(3.4.1). Parse it withRedactionPolicy::parse_validated; a policy that has not passedRedactionPolicy::validateis never applied. - Redactor
- A validated policy with the key its
digestactions need: the only path by which an exporter turns a record value into an exported one (3.4.7).
Enums§
- Action
- What happens to a field’s value on export (3.4.1).
- Applied
- One value after policy application.
- Field
Class - Field classes (3.3.1). Every exportable field belongs to exactly one.
- KeyError
- Why a digest key was refused (3.4.5). Never carries key bytes.
- Policy
Error - Why a policy was refused (3.4.2). Each names the entry.
- Redactor
Error - Why a
Redactorcould not be built. - View
- How a reader may show one attribute of a trace line (3.11.3).
Constants§
- DIGEST_
DOMAIN - The domain tag of the keyed digest (3.4.5).
- KEY_
BYTES - The bounds of a digest key, in bytes (3.4.5).
- KEY_
ID_ BYTES - The bounds of a digest key’s
key_id, in bytes (3.4.5). - MAX_
FIELD_ OVERRIDES - The most
fieldsoverrides a policy may carry (3.4.1). - REDACTION
- The schema string of a redaction policy.
- TRUNCATE_
BYTES - The bounds of
truncate{bytes}(3.4.1).
Functions§
- lineage_
class - The lineage rule for values carried in a judgment (3.3.2): a boolean or
enum value is
enum; any other value takes the most restrictive provenance class among its lineage’s inputs, in the orderattributed-claim,third-party,user-supplied,model-derived,authenticated-app-field,system-of-record; a value whose lineage has no input isplan-metadata. It never assigns a class less restrictive than an input the value may copy. - truncate_
str - Cut
sto at mostmaxbytes at a UTF-8 character boundary; true when bytes were removed. - truncate_
value - Cut every string of
vto at mostmaxbytes; other values are left as they are. True when any bytes were removed.