Closed andrewhowdencom closed 7 years ago
Would this be what you are looking for?
<?php
$registry = \Prometheus\CollectorRegistry::getDefault();
$counter = $registry->registerCounter('http', 'requests_total', 'Total number of requests', ['code']);
$counter->inc(['200']);
$counter->inc(['500']);
It was indeed! I found it shortly after I posted the issue; unfortunately, that was also after I'd lost the internet for the day.
Thanks for your help! In retrospect, it's there in the README -- I was trying to do things too quickly, and read right over it
Hallo,
I am somewhat confused at how to implement multiple metrics with different labels. Consider the following:
I cannot see how to implement this in PHP. If given the following code:
I have also tried supplying a 'range of default acceptable values', such as:
It's quite likely I'm missing something obvious. (:
Cheers! Enjoying playing with the library. See the intended goal at
https://github.com/littlemanco/magento-prometheus