From 94b8d32b5608273f4d8a17e526d9d20bfe8de11a Mon Sep 17 00:00:00 2001 From: Jaroslaw Gabara Date: Wed, 18 Jan 2017 15:09:20 +0100 Subject: [PATCH] added readme --- README.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/README.md b/README.md index e69de29..616e028 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,58 @@ +# Pluggit Monitoring + +Monitoring is a monitor factory system, which gives you ability to log information. + +## Instalation + +Add this repo to your composer.json + +````json +"repositories": { + "pluggit/monitoring": { + "type": "vcs", + "url": "git@github.com:CMProductions/monitoring.git" + } +} +```` + +Then require it as usual: + +``` bash +composer require "pluggit/monitoring" +``` + +To create factory, set default channel name as first parameter and Formatter as second one. +```php + $app['environment'], + 'mode' => $app['mode'] + ]); + +$logger = new Monitor($metricFactory, $eventFactory, $logger); +``` +## Handlers +### Adding senders +Sender should implement ``Cmp\Monitoring\Metric\SenderInterface`` +The library provides two types of senders, DataDox and Monolog +To add sender, use ``pushMetricSender()`` method +```php= +$monitor->pushMetricSender($sender); +``` + +## Usage +```php + 'fun application']; +$monitor->increment('tag.tag', $tags); +```