Cloudinsight PHP SDK
, (*1)
Installation
To install this package you will need:, (*2)
- PHP 5.5+
- Enable sockets, mbstring
You must then modify your composer.json file and run composer update to include the latest version of the package in your project., (*3)
"require": {
"cloudinsight/cloudinsight-sdk": "~0.0.1"
}
Or you can run the composer require command from your terminal., (*4)
$ composer require cloudinsight/cloudinsight-sdk
Quick Start Guide
Make sure your app require 'vendor/autoload.php', (*5)
use CloudInsight\Statsd;
$statsd = new Statsd;
//Increment a counter.
$statsd->increment('page.views');
//Record a gauge 100 of replies
$statsd->gauge('blogs.replies', 100);
//Record a gauge 50% of the time.
$statsd->gauge('users.online', 100, ['users.cloudinsight'], 0.5);
document see: http://docs-ci.oneapm.com/api/php.html, (*6)