Skip to main content

Module schema

Module schema 

Source
Expand description

On-disk Arrow schemas. These follow the OTAP star schema (otap-spec.md sections 5.4 and 6.3) rather than a flattened one-row-per-span layout: a root table per signal carrying resource_id/scope_id foreign keys, plus entity-attribute-value side tables keyed by parent_id.

Two deliberate deviations from the OTAP wire spec, both documented in docs/architecture.md:

  • parent_id and the root id are UInt32 and block-local. On the wire OTAP ids are only unique within one BatchArrowRecords; persisting them verbatim and joining across batches silently produces a cross product. We rebase to a dense per-block id at ingest, so a join inside a block is unconditionally correct and needs no partition discriminant column.
  • Attribute values are plain, not dictionary-encoded. Dictionary encoding is a low-cardinality technique with a hard ceiling (DictionaryKeyOverflow at 2^16 for UInt16 keys); attribute values are the highest-cardinality data in the system. Only enumerable columns (attribute keys, severity text) are dictionaries.

Enums§

AttrType
OTAP attribute value discriminant (type column). Matches otap-spec.md 5.4.
MetricKind
Which Metric.data variant a descriptor row carries.

Constants§

DICT_CAP
How many distinct values a UInt16 dictionary can hold. Lives here because it is a consequence of the key width chosen above, not of any one builder. Reaching it is a signal to seal the block, never to fail an export.
LOGS_BLOCK_TABLES
The tables a logs block is made of, in publish order.
METRICS_BLOCK_TABLES
The tables a metrics block is made of, in publish order.
TRACES_BLOCK_TABLES
The tables a traces block is made of, in publish order.

Statics§

ATTRS
Shared shape for LOG_ATTRS / RESOURCE_ATTRS / SCOPE_ATTRS.
EXEMPLARS
EXEMPLARS — the bridge from a metric point to the trace that produced it.
EXP_HIST_DP
EXP_HIST_DP — exponential histogram points.
HIST_BOUNDS
HIST_BOUNDS — the interned explicit_bounds arrays of this block.
HIST_DP
HIST_DP — explicit-bucket histogram points.
LOGS
LOGS root table.
METRICS
METRICS descriptor table — one row per Metric message, not per point.
NUMBER_DP
NUMBER_DP — gauge and sum points.
RESOURCES
RESOURCES table — one row per distinct resource in the block.
SPANS
SPANS root table.
SPAN_EVENTS
SPAN_EVENTS — a child table, not a List<Struct> column.
SPAN_LINKS
SPAN_LINKS — same child-table reasoning as SPAN_EVENTS.
SUMMARY_DP
SUMMARY_DP — the legacy quantile representation, kept because OTLP still carries it out of Prometheus.

Functions§

dict_u16_utf8 🔒
dict_u32_utf8 🔒
A dictionary wide enough that a block cannot fill it.
dp_head 🔒
Columns every data point table has, in the same order, so that a temporal filter is the same code against any of the four.
list_of 🔒
ts 🔒