Encoding · Types · Structs · Enumerations · Constants · Vocabulary · Refusals · Protocol
Schema
One definition; this page and every encoder are emitted from it. Nothing below is written by hand, and each rule tag links the construct to the profile that admits it.
Encoding [DEF-E1]
| setting | value | rule |
escape | minimal | [DEF-E2] |
indent | 2 | [DEF-E3] |
map_keys | utf8-bytes | [DEF-E4] |
numbers | integer-decimal | [DEF-E5] |
opaque | verbatim | [DEF-E6] |
terminator | newline | [DEF-E7] |
duplicate_keys | last | [DEF-E8] |
depth_limit | 64 | [DEF-E9] |
Types
| kind | types |
| built in | bool i64 string |
| repeated record [DEF-A9] | list<Attestation> |
| string map [DEF-A10] | map<string,string> |
Named types [DEF-T2]
One spelling is written [DEF-G2] and a wider set is read [DEF-G1]; the width between them is the interoperability guarantee.
| name | is | written | read |
timestamp | string | rfc3339-micros | rfc3339-wide |
Structs [DEF-T1]
A field is required, or says when it is omitted [DEF-A4]. Each struct says on its own what it does with a field name it has never heard of [DEF-A7]. A wire name never moves; where a language must spell it differently the field says so [DEF-A2].
Attestation
unknown fields grant
| id | field | type | presence | named elsewhere |
| 1 | by | string | required | — |
| 2 | verified | bool | required | — |
| 3 | hop | i64 | required | — |
| 4 | program | string | optional · omitted when zero | — |
| 5 | host | string | optional · omitted when zero | — |
| 6 | user | string | optional · omitted when zero | — |
| 7 | exe | string | optional · omitted when zero | — |
| 8 | uid | i64 | required | — |
| 9 | gid | i64 | required | — |
| 10 | pid | i64 | required | — |
| 11 | key | string | optional · omitted when zero | — |
| 12 | mac | string | optional · omitted when zero | — |
Record
the document [DEF-A1] · unknown fields grant
| id | field | type | presence | named elsewhere |
| 1 | schema | i64 | required; equals 1; refusal bad_schema | — |
| 2 | time | timestamp | required | — |
| 3 | level | i64 | required | — |
| 4 | msg | string | required | — |
| 5 | identity | list<Attestation> | optional · omitted when zero | — |
| 6 | job | string | optional · omitted when zero | — |
| 7 | attrs | map<string,string> | optional · omitted when zero | — |
Refusal words [DEF-R1]
| order | word | stage |
| 1 | malformed | grammar |
| 2 | bad_string | grammar |
| 3 | number_spelling | grammar |
| 4 | wrong_type | grammar |
| 5 | bad_timestamp | grammar |
| 6 | depth_exceeded | grammar |
| 7 | duplicate_field | structure |
| 8 | unknown_field | structure |
| 9 | missing_field | structure |
| 10 | bad_schema | structure |
| 11 | trailing_bytes | document |
Service Sink [DEF-S1]
A sink for structured log records across a service boundary.
Wire identity: abstraction.logging/sink@1
Frames carry version, service, method and typed arguments. Transport owns framing, associated exchanges, deadlines and connections. Unknown version/service/method and malformed arguments are rejected before invoking a handler. One-way WriteFrame success means local submission, not remote acceptance or persistence.
Submit a log record. Completion confirms local transport submission only.
Write
oneway void
- Argument 1:
Record record (required, including zero/false/empty)