Skip to content
This repository has been archived by the owner on Jul 17, 2023. It is now read-only.

mmz-srf/srf-datadog-statsd-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SRF Datadog StatsD Bundle

Description

Symfony bundle SRFDatadogStatsDBundle integrates the datadog StatsD API to Symonfy

Installation

Get the Bundle

Choose your version from packagist.org and add a requirement to your composer.json:

Using the console:

php composer.phar require mmz-srf/srf-datadog-statsd-bundle

Composer will add the dependency to your configuration.

Register the Bundle

Add the bundle in your app/AppKernel.php like this:

public function registerBundles()
{
   $bundles[] = new SRF\Bundles\SRFDatadogStatsDBundle\SRFDatadogStatsDBundle();
}

Update your dependencies

Run php composer.phar update mmz-srf/srf-datadog-statsd-bundle

Clear the caches

Run php app/console cache:clear

Usage

  • Log to Monolog:*
$this->container->get('srf.metrics.consumer.monolog')->timing('my.key', 4);
  • Log to Datadog StatsD:*
$this->container->get('srf.metrics.consumer.datadog')->timing('my.key', 4);

License

The Bundle is licensed under MIT. For details, see LICENSE.

Maintained by @ymc-pabu