PHP code example of fortis / silex-graphite

1. Go to this page and download the library: Download fortis/silex-graphite library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fortis / silex-graphite example snippets


  $app->register(new GraphiteServiceProvider(), [
    'graphite.options' => [
      'apiKey' => 'fcd8e41a-808e-449d-bfa0-5537a4ce168e7',
      'host'      => 'udp://8a1ga0ff.carbon.hostedgraphite.com',
      'port'      => 2003,
      'prefix' => 'some.metric.namespace'
    ]
  ]);