Publically expose immutable attributes on MetricWrapperBase
things like MetricWrapperBase._labelnames are immutable, but are passed in as parameters when instantiating MetricWrapperBase objects. These would be useful if they were exposed?
@property
def labelnames(self) -> Tuple[str, ...]:
return self._labelnames
Hello, do you have a concrete use case where you would like to use the the labelnames specified on a metric? If it is helpful I can see exposing it, but I don't know of a required use case today.
(Admittedly this is from legacy code that I have not written myself, so I am not entirely sure about the original intention) But what I can see is that we current have to keep track of these label names externally and compare them against inputs accepted by a function just to make sure that what the metric is going to receive is correct. Its just not very clean this way if we don't access the property. I know we can access the private variable as a workaround, but that isn't ideal.
Hmm, for that use case could you use the kwargs that can be passed to .labels() to ensure safety?