PHPackages                             buonzz/l4-newrelic-insight - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. buonzz/l4-newrelic-insight

ActiveLibrary[Framework](/categories/framework)

buonzz/l4-newrelic-insight
==========================

Laravel Library for Interacting with NewRelic's Insight

v1.0.2(11y ago)035MITPHPPHP &gt;=5.3.28

Since Jun 23Pushed 11y agoCompare

[ Source](https://github.com/buonzz/l4-newrelic-insight)[ Packagist](https://packagist.org/packages/buonzz/l4-newrelic-insight)[ RSS](/packages/buonzz-l4-newrelic-insight/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Laravel Library for NewRelic Insight
====================================

[](#laravel-library-for-newrelic-insight)

This is a Laravel Library for Interacting with NewRelic's Insight. This tries to make you define simple events in Laravel-way and make it appear in the NewRelic Insights dashboards.

Features
--------

[](#features)

- PSR-0 autoloading compliant structure
- Unit-Testing with PHPUnit
- PHPDocumentor

Requirements
------------

[](#requirements)

- cURL
- PHP &gt;= 5.3.0
- Valid NewRelic Account ID - see
- NewRelic Insight API Query Key - see
- NewRelic Insight API Insert Key - see

Installation
------------

[](#installation)

Require the package in your composer.json file

```
composer require buonzz/l4-newrelic-insight

```

Add the service provider and facade in your config/app.php Service Provider

```
Buonzz\NewRelic\Insight\Laravel4\ServiceProviders\InsightServiceProvider

```

Facade

```
'Insight'            => 'Buonzz\NewRelic\Insight\Laravel4\Facades\Insight',

```

Pubish the configuration file

```
php artisan config:publish buonzz/l4-newrelic-insight

```

Edit the config file in app/config/packages/buonzz/l4-newrelic-insight/config.php

- account\_id - is required, this should be your NewRelic Account ID
- query\_key - required when you need to retrieve data from NewRelic
- insert\_key - required when you need to insert custom events

Usage
-----

[](#usage)

Execute Queries

```
$nrql = "SELECT uniquecount(session) FROM PageView";
$nrql .= "WHERE appName='PHP Application' SINCE 1 hour ago COMPARE WITH 1 hour ago";
$result = Insight::query($nrql);

```

Send Custom Events

```
$events = array();
$events[] = array('eventType'=> 'Event Name', 'atrribute1'=> 'attribute value 1', 'attribute2'=> 'atrribute value 2');
Insight::insertCustomEvents($events);

```

You can also dynamically set the config settings in runtime:

```
Insight::setAccountID(''); // used to associate your account to calls
Insight::setQueryKey(''); // required to query data
Insight::setInsertKey(''); // this is when you need to send custom events

```

List PageViews within the last hour

```
use Buonzz\NewRelic\Insight\Aggregates\PageView;

Route::get('pageviews', function()
{
	$pv = new PageView();
	$pageviews = $pv->all();
	return $pageviews;
});

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~41 days

Total

3

Last Release

4259d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.0

v1.0.2PHP &gt;=5.3.28

### Community

Maintainers

![](https://www.gravatar.com/avatar/ace28ed0f8f9067b0083c1cdce556c1b183d91d8cf2ef65a01736fe1c1464782?d=identicon)[buonzz](/maintainers/buonzz)

---

Top Contributors

[![buonzz](https://avatars.githubusercontent.com/u/946233?v=4)](https://github.com/buonzz "buonzz (34 commits)")

---

Tags

frameworklaravelnewrelicnewrelic insightphp newrelicinsight php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/buonzz-l4-newrelic-insight/health.svg)

```
[![Health](https://phpackages.com/badges/buonzz-l4-newrelic-insight/health.svg)](https://phpackages.com/packages/buonzz-l4-newrelic-insight)
```

###  Alternatives

[rebing/graphql-laravel

Laravel wrapper for PHP GraphQL

2.2k7.1M26](/packages/rebing-graphql-laravel)[graham-campbell/markdown

Markdown Is A CommonMark Wrapper For Laravel

1.3k7.1M64](/packages/graham-campbell-markdown)[graham-campbell/manager

Manager Provides Some Manager Functionality For Laravel

39221.1M134](/packages/graham-campbell-manager)[laravel-lang/publisher

Localization publisher for your Laravel application

2167.7M24](/packages/laravel-lang-publisher)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M369](/packages/laravel-zero-framework)[lanin/laravel-api-debugger

Easily debug your JSON API.

2311.8M](/packages/lanin-laravel-api-debugger)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
