Skip to main content

MET_NAME_LEN

Constant MET_NAME_LEN 

Source
pub const MET_NAME_LEN: usize = 20;
Expand description

Bytes of a METRIC’s name. Deliberately NOT PEER_LEN.

PEER_LEN is 12 because the longest SERVICE name that matters is block-driver. A metric name is a different kind of thing and wants more room - ring.recorded is already 13 - so reusing the service bound for it was wrong, and it bit immediately: the sink’s own first metric was truncated to ring.recorde. Sizing a field by what it will hold, rather than by what an adjacent field holds, is the whole fix.