An event is the Core telling whoever watches that something happened: a unit changed state, a
channel was suspended, a plugin's policy changed. Every event carries the same eight fields, whatever
its type, so a consumer can place, rank and order one it has never seen before. An event's authority is
nil: it tells a consumer that something happened, and a consumer about to decide anything asks the
Core. This page gives the eight fields, the six kinds of subject, the clock, the four classes of actor,
and how an event names the one it follows from.
The eight fields
| Field | Type | Present | Holds |
|---|
type | a name under the grammar | always | what happened, and what a subscription filters on |
subject | a kind and an identity | always | what it is about |
time | the Core's clock | always | when the Core reached the conclusion |
actor | one of four classes | always | who caused it |
severity | an integer, 0–99 | always | how serious, on the one ordered scale |
occurrence | a class the unit declared and was granted | only on unit.occurrence.reported | which domain occurrence this is |
cause | the sequence of another event | optional | the event this one follows from |
detail | typed per type | optional | what that type needs |
The subject
| Kind | Identity | Also carries |
|---|
instance | the instance's name | — |
unit | the unit's declared identity | its incarnation: a fact about a unit is a fact about one of its lives |
plugin | the plugin's namespaced identity | — |
channel | the channel's declared name | — |
document | the document as it was read — a path | — |
connection | the connection's identity, assigned when it opened | — |
- Six kinds, closed. The kind travels apart from the identity: identities are unique only within
their kind, and a subscriber filters on what an event is about without knowing every type.
- A connection is not a Session. A Session is what a Plugin unit holds with the Core; a connection is
a person or a tool attached to the administrative surface. Only connections held open are subjects.
- A stream is not a kind. A stream identifier is unique only within its unit; an event about a
stream is an event about its unit, naming the stream in
detail.
The clock
time is the Core's, taken when it reached the conclusion. One instance is one process, so one clock
stamps every event it emits. A unit's report becomes an event stamped when the Core received and
concluded it; a sender's own clock is never used.
The actor
| Class | Means | Carries |
|---|
core | a conclusion the Core reached | nothing further |
operator | somebody acting through a surface | the person's identity, where the surface's channel established one |
unit | the Core translating something a unit reported | nothing further: the subject names the unit |
host | a fact about a process, from the kernel or a container engine | nothing further |
Four classes and no free text. The actor is established by the Core, never stated by the party it
names. The class also says which source graded the event: see severity.
The sequence, and cause
| |
|---|
| What | an integer the Core assigns when it publishes an event |
| Scope | monotonic within one life of the instance, meaningless outside it |
| Carried in | cause, which holds the sequence of the earlier event |
| Not | the log store's sequence: an event is published before its durable counterpart is written |
- A dependent that did not start points at the unit that failed; a restart storm reads as one chain.
- A chain is followed by reading
cause repeatedly, and ends at an event with no cause.
- The sequence is not filterable, and a consumer that ignores it loses only the chain.
What never travels
- A domain payload. That a stream was activated travels; what the stream carries does not.
- Evidence, rather than a conclusion. A heartbeat that arrived, or one that was missed, is not an
event; what is published is the state change the misses eventually caused, with its reason.
- Anything before the instance exists. A bundle refused before a Core starts is reported by whoever
attempted the start. A declaration the running Core rejects is an event.
| |
|---|
| the severity scale | integers 0–99, higher more serious |
| the event sequence | an integer, monotonic within one life of the instance |
| subject kinds | six, closed |
| actor classes | four, closed |