nti/metrics-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nti/metrics-bundle

最新稳定版本:v1.1.0

Composer 安装命令:

composer require nti/metrics-bundle

包简介

Send metrics to StatsD Server.

README 文档

README

StatsD Client

Installation

  1. Install the bundle using composer:

    $ composer require nti/metrics-bundle "dev-master"
  2. Add the bundle configuration to the AppKernel

    public function registerBundles()
    {
        $bundles = array(
            ...
            new NTI\MetricsBundle\NTIMetricsBundle(),
            ...
        );
    }
  3. Setup the configuration in the config.yml

# NTI Metrics
nti_metrics:
    host: "statsDserver" # default: localhost
    port: 8125           # default: 8125
    prefix: "greenlink." # default: ""

Usage

  1. Get the Metrics Client service
$collector = $container->get('nti.metrics');

The following methods are available for send metrics:

$collector->increment('glbs.email.send');            # Same as send "glbs.email.send:1|c"
$collector->decrement('glbs.email.send');            # Same as send "glbs.email.send:-1|c"

To send the values to statsD server you have to call the following method:

$collector->flush();

统计信息

  • 总下载量: 1.09k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 7
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固