Skip to main content

Module native_histogram

Module native_histogram 

Source
Expand description

Shared native histogram field contract.

Prom remote-write v2 stores these names as children of one Struct field, while metric-engine uses the same contract to recognize native histogram tables. NativeHistogram is the query-time representation and therefore normalizes integer and floating-point payloads to absolute f64 counts.

ModulesΒ§

encoding πŸ”’

StructsΒ§

Bucket πŸ”’
A materialized bucket used by query-time estimators and renderers.
NativeHistogram
Query-time representation of a Prometheus native histogram.
NativeHistogramError
Error returned while validating or encoding a native histogram.
Span
A contiguous run of populated sparse buckets.

EnumsΒ§

BoundaryRule πŸ”’
Inclusion rules for a materialized bucket’s lower and upper bounds.
CounterResetHint
Information carried by a native histogram about a possible counter reset.
NativeHistogramQuantileInfo
Additional information produced while estimating a native histogram quantile.

ConstantsΒ§

COUNTER_RESET_HINT
Reset hint indicating the first histogram after a counter reset.
COUNT_F64_FIELD
COUNT_I64_FIELD
CUSTOM_BUCKETS_SCHEMA
Schema identifier for native histograms with explicit custom bucket bounds.
CUSTOM_VALUES_FIELD
GAUGE_RESET_HINT
Reset hint identifying a gauge histogram.
MAX_EXPONENTIAL_SCHEMA πŸ”’
MIN_EXPONENTIAL_SCHEMA πŸ”’
NATIVE_HISTOGRAM_FIELD
NATIVE_HISTOGRAM_FIELD_NAMES
NATIVE_HISTOGRAM_LIST_ELEMENT_OFFSET
Offset of list element ids within a column’s id block.
NATIVE_HISTOGRAM_SUBFIELD_ID_BASE
Reserved base for native-histogram struct sub-field ids.
NATIVE_HISTOGRAM_SUBFIELD_ID_STRIDE
Number of ids reserved per histogram column (18 sub-fields + headroom for list element ids), so multiple histogram columns get disjoint ids.
NEGATIVE_BUCKETS_F64_FIELD
NEGATIVE_BUCKETS_I64_FIELD
NEGATIVE_SPAN_LENGTHS_FIELD
NEGATIVE_SPAN_OFFSETS_FIELD
NOT_COUNTER_RESET_HINT
Reset hint indicating that no counter reset occurred.
POSITIVE_BUCKETS_F64_FIELD
POSITIVE_BUCKETS_I64_FIELD
POSITIVE_SPAN_LENGTHS_FIELD
POSITIVE_SPAN_OFFSETS_FIELD
RESET_HINT_FIELD
SCHEMA_FIELD
START_TIMESTAMP_FIELD
SUM_FIELD
UNKNOWN_COUNTER_RESET_HINT
Reset hint indicating that the payload must be inspected.
ZERO_COUNT_F64_FIELD
ZERO_COUNT_I64_FIELD
ZERO_THRESHOLD_FIELD

StaticsΒ§

NATIVE_HISTOGRAM_VALUE_TYPE πŸ”’

FunctionsΒ§

add_reset_hint πŸ”’
build_histogram_array
Builds a native histogram Struct array from query-time values.
ceil_div πŸ”’
check_span_bucket_count πŸ”’
compact_side πŸ”’
encode_native_histogram
Validates and encodes a Prometheus histogram into the canonical Struct value.
expand_zero_threshold_side πŸ”’
exponential_overflow_bucket_index
Returns the index of the exponential bucket containing positive infinity.
fold_zero_side πŸ”’
format_promql_histogram_float πŸ”’
Formats a histogram component like Prometheus’s default %g formatter.
get_bound πŸ”’
is_native_histogram_value_schema
Returns whether a named column matches the configured native histogram contract.
is_native_histogram_value_type
Returns whether data_type matches the native histogram value contract.
list_child πŸ”’
list_opt πŸ”’
list_values πŸ”’
map_custom_side πŸ”’
merge_side πŸ”’
native_histogram_arrow_type
Returns the Arrow type for a complete native histogram value.
native_histogram_column_schema
Returns the canonical column schema for a native histogram value.
native_histogram_field_type
Returns the exact Greptime type for a persisted native histogram field.
native_histogram_list_element_id
Returns the stable list element-id for a list-typed native-histogram sub-field, namespaced by its parent column_id, or None if name is not a known sub-field or the derived id overflows a positive i32.
native_histogram_subfield_id
Returns the stable field id for a native-histogram struct sub-field, namespaced by its parent column_id, or None if name is not a known sub-field or the derived id overflows a positive i32.
native_histogram_value_type
Returns the exact Greptime type for a complete native histogram value.
optional_primitive πŸ”’
primitive_child πŸ”’
read_histogram
Decodes one native histogram row into the query-time NativeHistogram model.
read_spans πŸ”’
reconcile_custom πŸ”’
reconcile_exponential πŸ”’
reduce_side πŸ”’
required_primitive πŸ”’
side_bucket_indices πŸ”’
side_counts πŸ”’
side_layout_equal πŸ”’
span_bucket_len πŸ”’
spans_from_indices_counts πŸ”’
struct_child πŸ”’
subfield_index πŸ”’