rcrowe/laravel-statsd 问题修复 & 功能扩展

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

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

rcrowe/laravel-statsd

最新稳定版本:v0.5.2

Composer 安装命令:

composer require rcrowe/laravel-statsd

包简介

Send to Statsd server from Laravel

README 文档

README

Allows you to seamlessly send data to a Statsd server from within your Laravel application.

Build Status

Installation

Add rcrowe\laravel-statsd as a requirement to composer.json:

{
    "require": {
        "rcrowe/laravel-statsd": "0.5.*"
    }
}

Update your packages with composer update or install with composer install.

Once Composer has installed or updated your packages you need to register Statsd with Laravel itself. Open up app/config/app.php and find the providers key towards the bottom and add:

'rcrowe\Statsd\StatsdServiceProvider'

You will also need to register the facade so that you can access it within your application. To do this add the following to your aliases in app/config/app.php:

'Statsd' => 'rcrowe\Statsd\Facades\Statsd'

Configuration

Statsd configuration file can be extended by creating app/config/packages/rcrowe/laravel-statsd/config.php. You can find the default configuration file at vendor/rcrowe/laravel-statsd/src/config/config.php.

You can quickly publish a configuration file by running the following Artisan command.

$ php artisan config:publish rcrowe/laravel-statsd

Usage

Laravel-Statsd exposes the following functions to send data to Statsd:

Statsd::timing($key, $time);
Statsd::gauge($key, $value);
Statsd::set($key, $value);
Statsd::increment($key);
Statsd::decrement($key);
Statsd::updateCount($key, $delta);

The data is automatically sent to Statsd at the end of Laravels life-cycle, but you can force data to be sent with:

Statsd::send()

Note: Data will only be sent to Statsd if your environment matches the environments defined in the config file.

统计信息

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

GitHub 信息

  • Stars: 22
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2013-01-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固