StatKey
Typed handle to one entry in a StatSchema / GroupResult. Carries the result type R as a phantom type so reading back from a GroupResult produces a typed value rather than an Any:
object Telemetry : StatSchema() {<br> val latency by series(Mean)<br>}<br>val result: WeightedMeanResult = group.read()[Telemetry.latency]Content copied to clipboard
Keys come out of the schema's declarators (series, paired, vector, discrete, group); callers don't usually construct them by hand.
The R type parameter is a phantom marker; narrows the return type of GroupResult.get(key) without affecting the wire format.