#[non_exhaustive]pub enum Point {
Show 20 variants
Action {
message: &'static str,
},
Send {
actor: &'static str,
message: &'static str,
},
Handle {
actor: &'static str,
message: &'static str,
},
Spawn {
actor: &'static str,
actor_id: u64,
output: &'static str,
},
Settled {
actor: &'static str,
actor_id: u64,
output: &'static str,
took_us: u64,
},
Cancelled {
actor: &'static str,
actor_id: u64,
output: &'static str,
took_us: u64,
},
Source {
actor: &'static str,
actor_id: u64,
output: &'static str,
},
Arrived {
actor: &'static str,
actor_id: u64,
output: &'static str,
source: u64,
},
Pull {
actor: &'static str,
actor_id: u64,
output: &'static str,
source: u64,
},
Closed {
actor: &'static str,
actor_id: u64,
output: &'static str,
took_us: u64,
gone: bool,
},
Publish {
event: &'static str,
bus: Bus,
subscribers: usize,
},
Deliver {
event: &'static str,
bus: Bus,
},
Push {
reducer: &'static str,
},
Navigate {
root: String,
to: String,
},
Tick {
timer: u64,
},
Store {
op: StoreOp,
path: String,
field: Option<String>,
outside: bool,
},
Render {
segment: &'static str,
took_us: u64,
},
Log {
level: Level,
target: &'static str,
file: Option<&'static str>,
line: Option<u32>,
module: Option<&'static str>,
text: String,
},
Span {
name: &'static str,
level: Level,
target: &'static str,
file: Option<&'static str>,
line: Option<u32>,
module: Option<&'static str>,
fields: String,
},
Note(String),
}Expand description
An observable point, with what identifies it.
Names are short type names: processes::Kill, not a crate path.
New kinds of point come in patch releases, so a match on it outside this crate needs an arm for the ones it doesn’t know yet:
use guinea_trace::Point;
fn known(point: &Point) -> bool {
match point {
Point::Action { .. }
| Point::Send { .. }
| Point::Handle { .. }
| Point::Spawn { .. }
| Point::Settled { .. }
| Point::Cancelled { .. }
| Point::Source { .. }
| Point::Arrived { .. }
| Point::Pull { .. }
| Point::Closed { .. }
| Point::Publish { .. }
| Point::Deliver { .. }
| Point::Push { .. }
| Point::Navigate { .. }
| Point::Tick { .. }
| Point::Store { .. }
| Point::Render { .. }
| Point::Log { .. }
| Point::Span { .. }
| Point::Note(_) => true,
}
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Action
The UI asked a feature for something.
Send
A message was queued for an actor.
Handle
An actor handled a message.
Spawn
An actor started background work whose result will come back as
output. actor is the address it will come back to, by the id the
snapshot lists it under: what a task belongs to is what that actor
belongs to.
Settled
Background work finished, and its result is on its way to the actor.
Cancelled
Background work was dropped where it last awaited, because the actor that started it is gone. Nothing comes back.
Source
An actor opened a source whose items will come to it as output.
Recorded under what opened it, which is done with it once it is open:
the items are not its work.
Arrived
An item came from a source, as output. A root, as a timer’s tick
is; source is the id of the Point::Source it came from.
Pull
A source is making its next item, which will come as output: what
its stream does meanwhile is recorded under this. A root, as
Point::Arrived is; source is the id of the Point::Source.
Open from when the source is asked for the item until it has it, runs
dry or is dropped.
Closed
A source ended: it ran dry, or gone - the actor that opened it is
gone and the source was dropped where it last awaited.
Publish
An event went out.
Deliver
An event reached a subscriber that is not an actor.
Push
A reducer was changed.
A router moved.
Tick
A timer fired; timer is its id, as the application’s timers list
it.
Store
A persisted value changed.
Fields
Render
A page or layout drew itself, and how long that took. Recorded only
for the frames worth looking at - see observability::Rendering.
Log
An ordinary tracing event the application wrote.
Fields
Span
A tracing span the application opened - an #[instrument]ed
function, say. Open until the span closes, and current while it is
entered; what it took is the time it was entered, not the time it
waited in between.
Fields
level: LevelThe level it was opened at, as Point::Log’s.
file: Option<&'static str>Where it was written; see Point::Log.
Note(String)
Anything else worth a line.