Skip to main content

Module attrs

Module attrs 

Source
Expand description

The parts of the star schema that every signal has in common.

OTLP’s three signals disagree about almost everything, but they all hang off the same Resource-Scope preamble and they all carry attributes in the same key/type/value shape. schema::ATTRS is already one schema for all five attribute tables; this is the matching builder, plus ResourceScope, which owns the resources / resource_attrs / scope_attrs triple that is byte-identical whether it is fronting logs, spans or data points.

Extracted from logs.rs rather than designed up front: it is shared because it turned out to be the same code three times, which is the only good reason.

Structs§

AttrsBuilder
Builder for one attribute table — log, span, event, link, data point, exemplar, resource or scope. They are all the same nine columns.
DictColumn
A Dictionary<UInt16, Utf8> column that knows how full it is.
ResourceScope
The resources + resource_attrs + scope_attrs arms of the star, shared by every signal.
StrColumn
The str column of an attribute table, read through its dictionary.

Functions§

index
Build a block’s crate::bloom::ATTR_IDX over every attribute table in it.
index_table 🔒
resource_kv
scope_kv
Count the attributes a request will contribute, for a headroom check.
str_column
Read column 3 of any table with the ATTRS shape.
str_values
The same, for the one caller that reaches the column by name because the table it holds may be missing it — see frame::resource_names.