Skip to main content

Module semantic

Module semantic 

Source
Expand description

Per-table semantic metadata accumulated during one OTLP metrics encode pass.

A metric emits one or more tables (histogram and summary fan out into _bucket/_sum/_count companions). Each emitted table collects the metric’s scalar semantic keys. The resulting index is serialized onto the greptime.internal.semantic.per_table_index context extension and folded into each table’s options at auto-create time.

Conflict handling follows the RFC: when two sources disagree on a single-valued key the value collapses to mixed (or unknown for keys whose domain has no mixed).

Structs§

SemanticIndex
Index of {table_name -> {semantic_key -> value}} built while encoding.

Functions§

collapse_value 🔒
The collapsed value for a conflicting scalar key: mixed when the key’s domain accepts it, else unknown. Uses the vocabulary validator as the single source of truth for which keys allow mixed.