2017 © Pedro Peláez
 

library php-datadogstatsd

This is an extremely simple PHP datadogstatsd client

image

datadog/php-datadogstatsd

This is an extremely simple PHP datadogstatsd client

  • Thursday, June 21, 2018
  • by hkaj
  • Repository
  • 66 Watchers
  • 118 Stars
  • 823,875 Installations
  • PHP
  • 5 Dependents
  • 0 Suggesters
  • 69 Forks
  • 5 Open issues
  • 13 Versions
  • 11 % Grown

The README.md

PHP DataDog StatsD Client

CircleCI Author Packagist Version Total Downloads, (*1)

This is an extremely simple PHP DogStatsD client., (*2)

Requires PHP >= 5.6.0., (*3)

See CHANGELOG.md for changes., (*4)

For a Laravel-specific implementation that wraps this library, check out laravel-datadog-helper., (*5)

Installation

Add the following to your composer.json:, (*6)

"datadog/php-datadogstatsd": "1.5.*"

The first version shipped in composer is 0.0.3, (*7)

Or manually clone this repository and set it up with require './src/DogStatsd.php'., (*8)

Once installed, turn on the socket extension to PHP which must be enabled at compile time by giving the --enable-sockets option to configure., (*9)

Configuration

To instantiate a DogStatsd object using composer:, (*10)

<?php

require __DIR__ . '/vendor/autoload.php';

use DataDog\DogStatsd;

$statsd = new DogStatsd(
    array('host' => '127.0.0.1',
          'port' => 8125,
     )
  );

DogStatsd constructor, takes a configuration array. See the full list of available DogStatsD Client instantiation parameters., (*11)

Origin detection over UDP in Kubernetes

Origin detection is a method to detect which pod DogStatsD packets are coming from in order to add the pod's tags to the tag list., (*12)

To enable origin detection over UDP, add the following lines to your application manifest, (*13)

env:
  - name: DD_ENTITY_ID
    valueFrom:
      fieldRef:
        fieldPath: metadata.uid

The DogStatsD client attaches an internal tag, entity_id. The value of this tag is the content of the DD_ENTITY_ID environment variable, which is the pod’s UID. The agent uses this tag to infer packets' origin, and tag their metrics accordingly., (*14)

Usage

In order to use DogStatsD metrics, events, and Service Checks the Agent must be running and available., (*15)

Metrics

After the client is created, you can start sending custom metrics to Datadog. See the dedicated Metric Submission: DogStatsD documentation to see how to submit all supported metric types to Datadog with working code examples:, (*16)

Some options are suppported when submitting metrics, like applying a Sample Rate to your metrics or tagging your metrics with your custom tags., (*17)

Events

After the client is created, you can start sending events to your Datadog Event Stream. See the dedicated Event Submission: DogStatsD documentation to see how to submit an event to your Datadog Event Stream., (*18)

Service Checks

After the client is created, you can start sending Service Checks to Datadog. See the dedicated Service Check Submission: DogStatsD documentation to see how to submit a Service Check to Datadog., (*19)

Roadmap

  • Write unit tests
  • Document service check functionality

Tests

composer test

Lint

composer lint

Fix lint

composer fix-lint

The Versions

21/06 2018

dev-master

9999999-dev https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *
  • lib-curl *

 

by Avatar DataDog
by Alex Corley

php datadog

21/06 2018

1.0.2

1.0.2.0 https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *
  • lib-curl *

 

by Avatar DataDog
by Alex Corley

php datadog

21/06 2018

1.0.1

1.0.1.0 https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

The Requires

  • ext-curl *
  • lib-curl *
  • php >=5.3.0

 

by Avatar DataDog
by Alex Corley

php datadog

26/12 2017

1.0.0

1.0.0.0 https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

The Requires

  • ext-curl *
  • lib-curl *
  • php >=5.3.0

 

by Avatar DataDog
by Alex Corley

php datadog

20/12 2017

0.5.0

0.5.0.0 https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

The Requires

  • ext-curl *
  • lib-curl *
  • php >=5.3.0

 

by Avatar DataDog
by Alex Corley

php datadog

23/05 2017

dev-etienne/class_name_update

dev-etienne/class_name_update https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar DataDog
by Alex Corley

php datadog

24/05 2016

0.4.0

0.4.0.0 https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

The Requires

  • ext-curl *
  • lib-curl *
  • php >=5.3.0

 

by Avatar DataDog
by Alex Corley

php datadog

23/05 2016

dev-folkmaster-udp-events-curl

dev-folkmaster-udp-events-curl https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

The Requires

  • ext-curl *
  • lib-curl *
  • php >=5.3.0

 

by Avatar DataDog
by Alex Corley

php datadog

27/07 2015

0.3.0

0.3.0.0 https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar DataDog
by Alex Corley

php datadog

02/06 2015

0.2.0

0.2.0.0 https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

by Avatar DataDog
by Alex Corley

php datadog

17/03 2015

0.1.0

0.1.0.0 https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

by Avatar DataDog
by Alex Corley

php datadog

25/02 2015

0.0.3

0.0.3.0 https://www.datadoghq.com/

This is an extremely simple PHP datadogstatsd client

  Sources   Download

MIT

by Avatar DataDog
by Alex Corley

php datadog

04/06 2014

dev-rudy/batch_metrics

dev-rudy/batch_metrics

This is an extremely simple PHP datadogstatsd client

  Sources   Download

php datadog