Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PromPHP/prometheus_client_php
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.11.0
Choose a base ref
...
head repository: PromPHP/prometheus_client_php
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.12.0
Choose a head ref
  • 2 commits
  • 10 files changed
  • 2 contributors

Commits on Oct 18, 2024

  1. - Add PostgreSQL support in Storage/PDO.php (#162)

    - Add PostgreSQL tests in github workflow
     - Fix type hints and types in doc blocks
     - Add phpstan ignoreErrors for Redis: phpstan/phpstan#11728
    
    Signed-off-by: Alex <2646298@mail.ru>
    2646298 authored Oct 18, 2024
    Configuration menu
    Copy the full SHA
    600f6df View commit details
    Browse the repository at this point in the history
  2. 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 <garry.filakhtov@bigcommerce.com>
    
    * Fix PHPStan issues
    Signed-off-by: Garry Filakhtov <garry.filakhtov@bigcommerce.com>
    
    ---------
    
    Signed-off-by: Garry Filakhtov <garry.filakhtov@bigcommerce.com>
    software-artificer authored Oct 18, 2024
    Configuration menu
    Copy the full SHA
    50b70a6 View commit details
    Browse the repository at this point in the history
Loading