Tags: PromPHP/prometheus_client_php
Tags
APCng storage - avoid worst-case memory usage in buildPermutationTree (… …#123) * APCng storage - avoid worst-case memory usage in buildPermutationTree Signed-off-by: Josh Hoffer <[email protected]> * Fix PHPstan errors Signed-off-by: Lukas Kämmerling <[email protected]> --------- Signed-off-by: Josh Hoffer <[email protected]> Signed-off-by: Lukas Kämmerling <[email protected]> Co-authored-by: Lukas Kämmerling <[email protected]>
Redis ACL AUTH two argument supporting. (#167) * Redis ACL AUTH two argument supporting. Signed-off-by: Gennadii Chernykh <[email protected]> Signed-off-by: Gennadii Chernykh <[email protected]> * Redis ACL AUTH two argument supporting. Signed-off-by: Gennadii Chernykh <[email protected]> Signed-off-by: Gennadii Chernykh <[email protected]> * Fix not using empty in Redis Adapter * Fix not using empty in RedisNg Adapter --------- Signed-off-by: Gennadii Chernykh <[email protected]> Co-authored-by: Gennadii Chernykh <[email protected]> Co-authored-by: Lukas Kämmerling <[email protected]>
Ensure that label values are strings in APCNg adapter (#159) * Ensure that label values are strings in APCNg adapter APCNg is crashing if the label value provided wasn't a string, but something that can be coerced to string (such as int). The problem occurs in two different places: - when a metric is emitted, the `storeLabelKeys()` calls into `addItemToKey()` which has its second parameter type hinted as a `string` and throws a type error if anything else is passed. This results in partially stored state; - when trying to scrape metrics with partially stored state, the `APCng::collect()` will try to build all the permutations and expect all the key-value pairs for labels to exist, but numeric label values aren't persisted and so it will cause the `Undefined array key` error as reported in #154; This change ensures that label values are cast to the string type before encoding them and using as APC keys. Signed-off-by: Garry Filakhtov <[email protected]> * Fix PHPStan issues Signed-off-by: Garry Filakhtov <[email protected]> --------- Signed-off-by: Garry Filakhtov <[email protected]>
Add PDO storage adapter. (#157) * PDO storage adapter - counter. Signed-off-by: Janez Urevc <[email protected]> Co-authored-by: Lukas Kämmerling <[email protected]>
Avoid possible infinite loops on APCu eviction (#136) If we are unlucky with an APCu eviction at the wrong moment, and no other thread writing to the same metric, we can get stuck in an infinite loop where apcu_fetch will always return false. Fix by applying the same strategy as if apcu_fetch was false in the first place (before doing compare-and-swap) Signed-off-by: Tobias Bengtsson <[email protected]> Co-authored-by: Lukas Kämmerling <[email protected]>
[RenderTextFormat] Allow value errors to be rendered as comments (#142) * [RenderTextFormat] Allow value errors to be rendered as comments. Redis and RedisNg allow samples with mismatching labels to be stored, which could cause ValueError to be thrown when rendering. Rendering would fail as a result, which is not ideal. - Change render() to accept an optional $silent parameter. When set to true, render the errors as comments instead of throwing them and failing the whole operation. Signed-off-by: Joe Cai <[email protected]> --------- Signed-off-by: Joe Cai <[email protected]> Co-authored-by: Lukas Kämmerling <[email protected]>
Fix PHP notice: Undefined index: samples (#128) * Fix PHP notice: Undefined index: samples collectHistograms() in the storage adapters does not define ['samples'] as the default array keys and as such a notice is thrown when the MetricFamilySamples::__construct($data) is called when no samples are available. * added space --------- Co-authored-by: Lukas Kämmerling <[email protected]>
PreviousNext