cloudinsight/cloudinsight-sdk

Cloud Insight SDK. (http://www.oneapm.com/ci/feature.html)

v0.0.1 2016-05-05 10:47 UTC

This package is not auto-updated.

Last update: 2024-09-26 01:40:37 UTC


README

Build Status Development Version

安装

要安装此包,您需要

  • PHP 5.5+
  • 启用套接字,mbstring

然后您必须修改您的 composer.json 文件并运行 composer update 以将包的最新版本包含到您的项目中。

"require": {
   "cloudinsight/cloudinsight-sdk": "~0.0.1"
}

或者您可以在终端中运行 composer require 命令。

$ composer require cloudinsight/cloudinsight-sdk

快速入门指南

确保您的应用 require 'vendor/autoload.php'

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

文档请参阅:http://docs-ci.oneapm.com/api/php.html