Skip to content

source

etrack.ports.source

ports/source: where a framework's run enters — a source turns the framework's own hooks into edges of a span tree.

A source knows its framework and nothing of what follows: it reports each span it sees as an Edge (its kind, or None for plumbing the tree folds away), each streamed piece as a delta, each close with what it left. The FoldPort behind it orders, parents and stamps them. bind takes the host's own run configuration and hands it back with the source's hook attached and the run's id pinned, so the framework names the run as the tree does.

Edge

Bases: Struct

A span as a source first sees it: its id, its raw parent, what it is — None when it is plumbing — and where.

FoldPort

Bases: Protocol

What a source reports to: spans opened, pieces streamed, spans closed, and frames that open and close at once.

LocatePort

Bases: Protocol

A source that can tell which of its spans is running where the caller stands: its raw id, empty when none.

SourcePort

Bases: Provider, Protocol

A framework's run hooked to a fold: the host's config in, the same config with the hook and the run id out.