Skip to content

belka-tech/gauge-exporter-php-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gauge Exporter PHP Client

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);