Skip to main content

Module frame

Module frame 

Source
Expand description

The frame algebra: correlation as a closed set of operations (section 7.3).

A frame is a bounded region of telemetry β€” a time window, plus the traces and entities found in it. Every operation here is Frame -> Frame, which is the property the design turns on: an investigation is a walk over frames, every intermediate state is a legal frame, and there is no way to build one that is not executable.

That closure is what makes this the agentic surface rather than SQL. An agent handed a star schema with EAV attribute tables writes wrong joins, and they are silently wrong β€” a missing parent_id predicate returns a cross product that looks like data. An agent handed anchor and three expanders cannot express a wrong join at all.

There is no fetch here, and that is deliberate. Once a frame names a trace or a service, reading its rows is trace_id = ... or service.name = ... through the ordinary crate::query::search β€” both of which the block sidecars already prune on (section 7.4). A second read path would be a second predicate language for no new answer.

Blocking: this mmaps and page-faults, the same as crate::query. Callers on an async runtime must go through spawn_blocking.

StructsΒ§

Edge πŸ”’
Frame
A bounded region of telemetry.
Node πŸ”’
Stats
What a frame walk cost. The same four numbers a search reports, for the same reason: β€œhow much did that cost” is the first question when it is slow, and the second is what an agent uses to decide its filter was too broad.

EnumsΒ§

Expand
One step of a correlation walk.

ConstantsΒ§

ENTRY πŸ”’
The caller of a root span.
MAX_ENTITIES
MAX_TRACES
How wide a frame is allowed to get.
SIGNALS πŸ”’
The block directories, which are also the signal names on the wire.
STATUS_ERROR πŸ”’
OTLP STATUS_CODE_ERROR.
UNKNOWN πŸ”’
A resource with no service.name β€” which is a resource no SDK described.

FunctionsΒ§

anchor
Where an investigation starts: the frame around what a search matched.
binary πŸ”’
entities
Every entity present in a window, with its name and how many blocks hold it.
entity_keys πŸ”’
resources.key indexed by resource_id, for one block.
expand
Apply a walk to a frame, in order.
map
A service map over a window: who calls whom, how often, and how badly.
may_hold πŸ”’
Could this block hold any of these traces? Fails open, like every sidecar: a snapshot has no directory and a damaged filter reads as β€œscan me”.
names_of
service.name for the entities of a frame.
open_for πŸ”’
resource_names πŸ”’
service.name per entity key, accumulated across blocks.
walk_spans πŸ”’
The one pass both span-side expanders need: every span of the frame’s traces, with its start, its duration and its resource.