gopaljha/laravel-datadog 问题修复 & 功能扩展

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

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

gopaljha/laravel-datadog

Composer 安装命令:

composer require gopaljha/laravel-datadog

包简介

A simple package to wrap DataDog API for Timeseries metrics

README 文档

README

GitHub Issues GitHub Forks GitHub Stars GitHub License Twitter

Laravel DataDog

A simple package to use DataDog Series Metric using their API via TCP

Why?

Because some people cannot install the DataDog Agent or StatsD. So we have to use DataDog API to send data. Using the API losses the advantage of using UDP (unblocking) calls. This package gives you a nice way to send metric information and also make sure the jobs are queued.

Other packages

This package should only be used if you also find yourslef in the unique situation where you cannot use the DataDog Agent. Make sure you investigate the below packages first.

Installation

Pull in the package using Composer

composer require gopaljha/laravel-datadog
$providers = [
    GopalJha\LaravelDataDog\LaravelDataDogServiceProvider::class,
]

Publish the config file

php artisan vendor:publish --provider="GopalJha\LaravelDataDog\LaravelDataDogServiceProvider" --tag=config

Set your DataDog API key in your .env file using the key DATADOG_KEY.

How to use

Increment a Metric

\DataDog::increment('app.pageview');

Increment a Metric with tagging and Host

A powerful feature of DataDog is the ability to tag things.

\DataDog::increment('app.pageview', ['tag' => 'one', 'tag' => 'two']);

You can also send a custom host if you require.

\DataDog::increment('app.pageview', ['tag' => 'one', 'tag' => 'two'], 'example.com');

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固