Page MenuHomePhabricator

Provide a way to specify metric labels at metric initialization time.
Open, Needs TriagePublic

Description

Looking closer at the Prometheus instrumentation docs, StatsLib currently does not offer a way to specify the list of labels at metric creation time which the docs say it must.

A client library MUST allow for optionally specifying a list of label names at Gauge/Counter/Summary/Histogram creation time.

In addition, it may be worthwhile to provide a "default value" setting so that every observation does not require calls to setLabel().

Related: