Prometheus_client custom collector class #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my first draft to issue: #55
Rebuilt the entire metric creation and focuses on fetching the appropriate statistic that is associated with the metric instead of the other way round. The current code (v0.7.0) loops over all statistics and tries to find a metric it can change value for.
Changes
Not sure if this is something that is needed or not. Cannot find anything online regarding a best practise. Would like to have input on it.
Solves: Add debug-logging #48
Solves: Include target name as label #56
Also solves a bug where statistics from multiple targets could overwrite each other. Having unique labels solves this.
See comment: Kea HTTP ctrl-agent support #33 (comment)
Example of new labels
Things yet to do
Removed in the initial draft
This is a quite large change and I expect to be working on this for a while before we are happy with all changes.