2017 © Pedro Peláez
 

library newrelic-custom-event

Sends custom events to newrelic insights

image

ersoy-insider/newrelic-custom-event

Sends custom events to newrelic insights

  • Sunday, March 4, 2018
  • by ersoy-insider
  • Repository
  • 1 Watchers
  • 0 Stars
  • 516 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 229 % Grown

The README.md

Simple Library to send custom events to NewRelic Insights, (*1)

Coverage Status Build Status StyleCI Scrutinizer Code Quality, (*2)

Installation For Lumen

Require this package with Composer, (*3)

$ composer require ersoy-insider/newrelic-custom-event

or composer.json, (*4)

"require": {
  "ersoy-insider/newrelic-custom-event": "^1.0"
},

Configuration

Add service provider, (*5)

$app->register(\ErsoyInsider\NewrelicCustomEvent\NewRelicCustomEventServiceProvider::class);

If you want to use facade, add following line, (*6)

$app->withFacades(true, [
    '\ErsoyInsider\NewrelicCustomEvent\Facades\NewRelicDispatcher' => 'NewRelicDispatcher'
]);

Copy the /vendor/ersoy-insider/newrelic-custom-event/config/new-relic-custom-event.php file to your local config directory. Edit config/new-relic-custom-event.php for your NewRelic credentials., (*7)

Basic usage

app('new-relic-dispatcher')->fire($properties);

or, (*8)

\NewRelicDispatcher::fire($properties);
$properties = [
    'jobName' => 'test',
    'users' => [
        ['id' => 5, 'name' => 'testasdada'],
        ['id' => 55, 'name' => 'test3'],
        ['id' => 555, 'name' => 'test2'],
        ['id' => 5555, 'name' => 'test4'],
    ],
    'test' => 'another-parameter',
    'yet-another' => 'parameter',
    'will-be' => ['discarded'] // it will be discarded
    'will-not-be' => 'discarded' // it will not be discarded
];
  • $properties is basic array consist of key values.
  • Only users key's value is allowed to array, any other key of which value is discarded because of NewRelic's policy.
  • Events will be queued for delivery to NewRelic's Insights.

The Versions

04/03 2018
14/02 2018

dev-test-branch

dev-test-branch

Sends custom events to newrelic insights

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ersoy Pembe

php lumen newrelic

30/01 2018

1.0.0

1.0.0.0

Sends custom events to newrelic insights

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ersoy Pembe

php lumen newrelic