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

Skip to content
< 8000 script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-e789af5a4655.js">

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