igormatkovic/laravel-newrelic

Minimal NewRelic Functionality for Laravel
1,689
Install
composer require igormatkovic/laravel-newrelic
Latest Version:v0.1.2
PHP:^8.0
License:MIT
Last Updated:Oct 6, 2022
Links: GitHub  ·  Packagist
Maintainer: igormatkovic

Minimal Laravel NewRelic Integration

Latest Version on Packagist GitHub Tests Action Status

Simple NewRelic integration that names the APP in Newrelic for both CLI and Web requests.
It also includes a helper for the synthetics monitor and a deployment command helper.

Installation

You can install the package via composer:

composer require igormatkovic/laravel-newrelic

You can publish the config file with:

php artisan vendor:publish

These are the ENV variables you can edit

NEWRELIC_APP_NAME=MY.domain.com
NEWRELIC_API_KEY=some-api-key
NEWRELIC_APP_ID=1234567
NEWRELIC_DEFAULT_USER=me@email.com

# Optional
NEWRELIC_ENABLED=true
NEWRELIC_MONITOR_ENABLED=true
NEWRELIC_MONITOR_ENDPOINT="newrelic/ping"
NEWRELIC_MONITOR_RESPONSE=pong

Usage

Out of the box the App will automatically name the APP in NewRelic.

Synthetics Monitor Setup

NewRelic > Synthetic monitoring
Click on the Create Monitor > Availability

Populate the fields:

Name: Ping Monitor 
Url: https://mydomain.com/newrelic/ping

#Advanced Options
Text validation: pong

Deployment Logging

After each deployment you should run the Deployment trigger

Example if you are using Envoyer

php artisan newrelic:deploy "{{message}}" --user="{{author}}" --revision="{{sha}}" --changelog="Deployed from: {{branch}}"

Testing

composer test

Credits

License

The MIT License (MIT)

Related Packages

intouch/laravel-newrelic

Laravel 5 NewRelic Integration

1,155,902 172
buonzz/l4-newrelic-insight

Laravel Library for Interacting with NewRelic's Insight

35 0
ersoy-insider/newrelic-custom-event

Sends custom events to newrelic insights

32,365 1
laranex/laravel-newrelic

A Laravel package to integrate New Relic APM with Laravel

36,339 0
hod/rocketeer-newrelic

Newrelic notification plugin for rocketeer

18,435 0