Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Statsd Laravel Package

m6web/statsd

Simple StatsD client for PHP. Send counters, gauges, timers and sets to a StatsD/Graphite backend with minimal overhead. Designed for easy integration and straightforward API to instrument apps and collect metrics.

View on GitHub
Deep Wiki
Context7

usage

 $client = new \M6Web\Component\Statsd\Client(
                    array(
                        'serv1' => array('address' => 'udp://200.22.143.12'),
                        'serv2' => array('port' => 8125, 'address' => 'udp://200.22.143.12')
                    ),
                    new \M6Web\Component\Statsd\MessageFormatter\InfluxDBStatsDMessageFormatter()
                );

$client->increment('a.graphite.node');
$client->count('a.graphite.node', 5);
$client->timing('another.graphite.node', (float) $timing);
$client->set('a.graphite.set', 12);
$client->gauge('a.gauge.node', 8);

// with tags for influxDb 0.9 : add the tags array at the end of each function
$tags = ['foo' => 'bar', 'site' => 'www', 'country' => 'fr'];
$sampleRate = 1;

$client->increment('a.influxDb.node',  $sampleRate, $tags);
$client->count('a.influxDb.node', 5, $sampleRate, $tags);
$client->timing('another.influxDb.node', (float) $timing, $sampleRate, $tags);
$client->set('a.influxDb.set', 12, $sampleRate, $tags);
$client->gauge('a.influxDb.node', 8, $sampleRate, $tags);

$client->send(); // Send the metrics to the servers
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor