gupalo/prometheus-helper

Prometheus Helper

1.1.1 2022-05-21 12:18 UTC

This package is auto-updated.

Last update: 2022-07-21 12:41:49 UTC


README

Wrapper for PHP Prometheus library - promphp/prometheus_client_php

Install

composer require gupalo/prometheus-helper

Use

    public static function registration(bool $isSuccess): void
    {
        if ($isSuccess) {
            PrometheusHelper::inc('analytics_registration_success_total', 'registration success');
        } else {
            PrometheusHelper::inc('analytics_registration_error_total', 'registration error');
        }
    }

Also see tests.