fn encode_histogram(
table_writer: &mut MultiTableData,
name: &str,
hist: &Histogram,
resource_attrs: Option<&Vec<KeyValue>>,
scope_attrs: Option<&Vec<KeyValue>>,
) -> Result<()>
Expand description
Encode histogram data. This function returns 3 insert requests for 3 tables.
The implementation has been following Prometheus histogram table format:
- A
%metric%_bucket
table includinggreptime_le
tag that stores bucket upper limit, andgreptime_value
for bucket count - A
%metric%_sum
table storing sum of samples - A
%metric%_count
table storing count of samples.
By its Prometheus compatibility, we hope to be able to use prometheus quantile functions on this table.