belka-tech / gauge-exporter-client
Gauge Exporter PHP client
0.1.0
2024-10-01 06:23 UTC
Requires
- php: ^8.0
- ext-json: *
- guzzlehttp/psr7: ^2.6
- psr/http-client: ^1.0
- webmozart/assert: ^1.11
Requires (Dev)
- php-http/mock-client: ^1.6
- phpunit/phpunit: ^9.6
This package is not auto-updated.
Last update: 2025-01-07 11:00:02 UTC
README
PHP Client for Gauge Exporter.
Usage example
<?php use BelkaTech\GaugeExporterClient\GaugeExporterClient; use BelkaTech\GaugeExporterClient\MetricBag; use GuzzleHttp\Client; require_once "vendor/autoload.php"; $bag = new MetricBag('metric-name'); $bag->increment(['a' => 'b'], 100); $bag->increment(['a' => 'b', 'c' => 'd'], 500); $client = new GaugeExporterClient(new Client(), 'https://127.0.0.1:8181', ['env' => 'prod']); $client->send($bag, 150);