Download the PHP package codeasashu/statsd without Composer
On this page you can find all versions of the php package codeasashu/statsd. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codeasashu/statsd
More information about codeasashu/statsd
Files in codeasashu/statsd
Package statsd
Short Description a PHP client for statsd
License MIT
Homepage https://domnikl.github.com/statsd-php
Informations about the package statsd
statsd-php
A PHP client library for the statistics daemon (statsd) intended to send metrics from PHP applications.
Installation
The best way to install statsd-php is to use Composer and add the following to your project's composer.json
file:
Usage
When establishing the connection to statsd and sending metrics, errors will be suppressed to prevent your application from crashing.
If you run statsd in TCP mode, there is also a \Domnikl\Statsd\Connection\TcpSocket
adapter that works like the UdpSocket
except that it throws a \Domnikl\Statsd\Connection\TcpSocketException
if no connection could be established.
Please consider that unlike UDP, TCP is used for reliable networks and therefor exceptions (and errors) will not be suppressed in TCP mode.
Timings
Memory profiling
Gauges
statsd supports gauges, arbitrary values which can be recorded.
This method accepts both absolute (3) and delta (+11) values.
NOTE: Negative values are treated as delta values, not absolute.
Sets
statsd supports sets, so you can view the uniqueness of a given value.
disabling sending of metrics
To disable sending any metrics to the statsd server, you can use the Domnikl\Statsd\Connection\Blackhole
connection
class instead of the default socket abstraction. This may be incredibly useful for feature flags. Another options is
to use Domnikl\Statsd\Connection\InMemory
connection class, that will collect your messages but won't actually send them.
Authors
Original author: Dominik Liebler [email protected] Several other contributors - Thank you!
License
(The MIT License)
Copyright (c) 2019 Dominik Liebler
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.