Giter VIP home page Giter VIP logo

ekinometricbundle's Introduction

Ekino PHP Metric

Build Status

Integrate Ekino PHP Metric into Symfony2

WARNING - This bundle works with pending pull requests :

Requirements

  • This code must runs with CollectD or StatsD running
  • Users must have a good understanding on collecting and aggregating data/solution

Installation

Using Composer

Use composer.phar:

$ php composer.phar require ekino/metric-bundle

You just have to specify the version you want : dev-master. It will add the package in your composer.json file and install it.

Or you can do it by yourself, first, add the following to your composer.json file:

// composer.json
{
    // ...
    require: {
        // ...
        "ekino/metric-bundle": "dev-master"
    }
}

Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:

$ php composer.phar update ekino/metric-bundle

Configuration

ekino_metric:
    metrics:
        - { type: timer, service: "event_dispatcher::dispatch",   name: "php.symfony.event_dispatcher.{arg0}" }
        - { type: timer, service: "http_kernel::handle",          name: "php.symfony.http_kernel.handle" }
        - { type: timer, service: "templating::render",           name: "php.symfony.twig.render.{arg0}" }
        - { type: timer, service: "mailer::send",                 name: "php.mailer.send" }
        - { type: timer, service: "router::match",                name: "php.symfony.router.match"}
        - { type: timer, service: "router::generate",             name: "php.symfony.router.generate.{arg0}"}

    reporter: ekino.metric.reporter.statsd # ekino.metric.reporter.collectd

    reporters:
        collectd:
            hostname:   web1-php    # the hostname to send to collectd
            udp_host:   localhost   # the host where the UDP stream need to be send
            udp_port:   25826       # the port where the UDP stream need to be send

        statsd:
            udp_host:   localhost
            udp_port:   8125

        newrelic:
            application_name: Awesome Aplication # (mandatory, default value in newrelic is PHP Application)
            api_key:                             # New Relic API

Doctrine Collector

If you want to collect information about Doctrine query, you need to enable the doctrine profiler.

doctrine:
    dbal:
        default_connection: default
        connections:
            default:
                profiling: true
                driver:    %database_driver%
                dbname:    %database_name%
                user:      %database_user%
                host:      %database_host%
                password:  %database_password%

ekino_metric:
    [...]
    collectors: # configure built in collectors
        doctrine:
            prefix: 'mysql.query'

    collect_from:   # configure services to retrieve metric from
        - ekino.metric.collector.doctrine

ekinometricbundle's People

Contributors

rande avatar

Stargazers

Exuper O. avatar Jacek avatar Angus H. avatar Neuron avatar Giuseppe Roberti avatar Thomas Roche avatar Valerii Rabiievskyi avatar Gereon Sommer avatar Lukas Kahwe Smith avatar Benjamin Grandfond avatar Paul Redmond avatar Michele Orselli avatar  avatar Justin Rainbow avatar

Watchers

 avatar Lukas Kahwe Smith avatar James Cloos avatar Nicolas Mas avatar Sebastien Augereau avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.