feat(family): add ability to lookup metric by query type#158
feat(family): add ability to lookup metric by query type#158cheshirskycode wants to merge 1 commit intoprometheus:masterfrom
Conversation
…get_or_create` Signed-off-by: Michael Zhalevich <cheshirsky.code@gmail.com>
|
Thank you for the work here. I am hesitant to move forward.
I wonder whether keeping a |
|
Thank you for the answer. Concerns are reasonable.
All my alternative solutions lead to having Arc<RwLock<hashbrown::HashMap<RealLabels, ...>>> which is very similar to Family :) Anyway, you provide a good API. Thank you. Let me know if you need some help. |
As you likely know, you can implement your own metrics, e.g. in this particular case it sounds like you should provide your own custom
Appreciate the understanding!
Always! Thank you for offering your help on #162 (comment) @cheshirskycode! |
|
Closing here given the concerns above. Please open a new pull request in case you want to continue the discussion. |
Added ability to lookup metric by query type in
Family::get_or_createExample:
Performance difference:
&Labels {method: "GET".to_string(), url_path: "/metrics".to_string(), status_code: "200".to_string()}&LabelsQ {method: "GET", url_path: "/metrics", status_code: "200"}Fix: #157