Commit 624bb61
Refactor MetricWrapper magic to class hierarchy
The LabelWrapper class is also no more. For metric classes where you have set `labelnames`, you can call `.labels()` as before, to acquire a child metric object.
The internal API for child-level metrics did change slightly with this change; if you have a custom metric of some sort, be aware that instead of `_samples`, you should override `_child_samples`.
Fixes prometheus#210
Signed-off-by: Aarni Koskela <akx@iki.fi>1 parent b4d6020 commit 624bb61
2 files changed
Lines changed: 237 additions & 127 deletions
0 commit comments