2017 © Pedro Peláez
 

symfony-bundle metric-bundle

Add influxdb metrics in your sf2 app

image

mtxserv/metric-bundle

Add influxdb metrics in your sf2 app

  • Tuesday, January 26, 2016
  • by sdieunidou
  • Repository
  • 1 Watchers
  • 1 Stars
  • 4,474 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 10 % Grown

The README.md

MetricBundle

Really simple bundle to add metrics with InfluxDB in your Symfony2 application., (*1)

Installation

composer require mtxserv/metric-bundle

Configuration

Add in config_prod.yml, (*2)

metric:
    host: %app_metric_host%
    port: %app_metric_port% # UDP port
    enable_collector: true  # set true to collect data (request, execution time, memory, ..)

Usage

$this->get('metric')->add('app_queue', [
    'value'     => 1,
]);

Increment serie

$this->get('metric')->decrement('app_queue');

Decrement serie

$this->get('metric')->increment('app_queue');

Timing serie

$this->get('metric')->timing('app_queue', time());

Measure serie

$this->get('metric')->measure('app_queue', 10.0);

Add tags

An third argument is available on all methods to add tags., (*3)

Example:, (*4)

$this->get('metric')->add('app_queue', [
    'value'     => 1,
], [
    'region' => 'eu',
]);

Data Collector

To enable data collector (send on kernel.terminate event), set to true the enable_collector flag., (*5)

metric:
    enable_collector: true # set true to collect data (request, execution time, memory, ..)

The Versions

26/01 2016

dev-master

9999999-dev https://github.com/sdieunidou/MetricBundle

Add influxdb metrics in your sf2 app

  Sources   Download

MIT

The Requires

 

bundle symfony influxdb

22/01 2016

0.0.3

0.0.3.0 https://github.com/sdieunidou/MetricBundle

Add influxdb metrics in your sf2 app

  Sources   Download

MIT

The Requires

 

bundle symfony influxdb

22/01 2016

v0.0.2

0.0.2.0 https://github.com/sdieunidou/MetricBundle

Add influxdb metrics in your sf2 app

  Sources   Download

MIT

The Requires

 

bundle symfony influxdb

22/01 2016

v0.0.1

0.0.1.0 https://github.com/sdieunidou/MetricBundle

Add influxdb metrics in your sf2 app

  Sources   Download

MIT

The Requires

 

bundle symfony influxdb