8000 Refactor MetricWrapper magic to class hierarchy · Global-localhost/client_python@624bb61 · GitHub
[go: up one dir, main page]

Skip to content

Commit 624bb61

Browse files
akxbrian-brazil
authored andcommitted
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

File tree

2 files changed

+237
-127
lines changed

2 files changed

+237
-127
lines changed

0 commit comments

Comments
 (0)
0