Skip to main content

MET_LEN

Constant MET_LEN 

Source
pub const MET_LEN: usize = _; // 40usize
Expand description

Wire length of one metric: owner[12] + name[20] + value(8).

FIXED, like an event, and for the same reason: no allocation anywhere on the path, and a bound a reader can read off the source (ยง26.6.1). A name longer than MET_NAME_LEN is still TRUNCATED rather than refused - a truncated name identifies the sample to a human, where a refused sample is a hole in the instrument - but the truncation is now REPORTED once by ServiceContext::metric, because a name silently becoming a different name is exactly the quiet loss invariant 12 forbids.