laranex / laravel-newrelic
A Laravel package to integrate New Relic APM with Laravel
Requires
- php: ^7.4|^8.0
- monolog/monolog: ^3.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.0
Suggests
- ext-newrelic: Adds support for viewing logs in context within the New Relic UI
This package is auto-updated.
Last update: 2024-10-25 05:50:44 UTC
README
Laravel New Relic is a package that provides a custom log channel for New Relic. It also includes listeners to split Octane transactions into individual job and event transactions.
Why we use Laravel Newrelic Instead of New Relic Monolog Enricher?
The New Relic Monolog Enricher is not compatible with Monolog 3.0, and it has not been updated to address this issue. To overcome this limitation, I created this package to provide a custom log channel specifically designed for New Relic.
Installation
Before installing the Laravel New Relic package, make sure you have the New Relic PHP agent installed on your server.
To install the Laravel New Relic package, follow these steps:
-
Install the package via Composer:
composer require laranex/laravel-newrelic
-
Change the log channel in your
.env
file:LOG_CHANNEL=newrelic
-
(Optional) Configure your New Relic application name and license key in your
.env
file:NEW_RELIC_API_KEY="your_license_key"
These values will be automatically picked up by the package.
Changelog
For detailed information on recent changes, please see the CHANGELOG.
Contributing
We welcome contributions! Please see the CONTRIBUTING guide for more details.
Security
If you discover any security issues, please report them in accordance with our security policy outlined in the CONTRIBUTING guide.
Credits
Contributors
Versions
1.0.0
- Initial release
License
This project is primarily licensed under the Apache License, Version 2.0. For more details, please refer to the License File.
Please note that this package includes components based on the New Relic Monolog Enricher, which are subject to the New Relic License. All original code contributed to this package, excluding the New Relic Monolog Enricher components, is also made available under the MIT License.
Users are free to use, modify, and distribute the original code under either the Apache License 2.0 or the MIT License, depending on their preference, with the exception of the New Relic Monolog Enricher components, which must be used in accordance with the New Relic License.