PHP code example of cloudinsight / cloudinsight-sdk

1. Go to this page and download the library: Download cloudinsight/cloudinsight-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cloudinsight / cloudinsight-sdk example snippets


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