Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/inspector-apm/inspector-laravel
Code Execution Monitoring foe Laravel applications.
https://github.com/inspector-apm/inspector-laravel
inspector laravel lumen middleware monitoring
Last synced: about 3 hours ago
JSON representation
Code Execution Monitoring foe Laravel applications.
- Host: GitHub
- URL: https://github.com/inspector-apm/inspector-laravel
- Owner: inspector-apm
- License: mit
- Created: 2019-04-16T15:00:33.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-24T10:39:00.000Z (15 days ago)
- Last Synced: 2024-10-25T13:01:14.245Z (14 days ago)
- Topics: inspector, laravel, lumen, middleware, monitoring
- Language: PHP
- Homepage: https://inspector.dev
- Size: 284 KB
- Stars: 210
- Watchers: 5
- Forks: 15
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Inspector | Code Execution Monitoring Tool
[![Total Downloads](https://poser.pugx.org/inspector-apm/inspector-laravel/downloads)](//packagist.org/packages/inspector-apm/inspector-laravel)
[![Latest Stable Version](https://poser.pugx.org/inspector-apm/inspector-laravel/v/stable)](https://packagist.org/packages/inspector-apm/inspector-laravel)
[![License](https://poser.pugx.org/inspector-apm/inspector-laravel/license)](//packagist.org/packages/inspector-apm/inspector-laravel)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)> Before moving on, please consider giving us a GitHub star ⭐️. Thank you!
Code Execution Monitoring for Laravel applications.
- [Requirements](#requirements)
- [Install](#install)
- [Configure the Ingestion Key](#key)
- [Middleware](#middleware)
- [Test everything is working](#test)
- [Official Documentation](https://docs.inspector.dev/guides/laravel)
- [Contribution Guidelines](#contribution)## Requirements
- PHP >= 7.2.0
- Laravel >= 5.5## Install
Install the latest version by:
```
composer require inspector-apm/inspector-laravel
```## For Lumen
If your application is based on Lumen you need to manually register the `InspectorServiceProvider`:```php
$app->register(\Inspector\Laravel\InspectorServiceProvider::class);
```### Configure the Ingestion Key
First put the Ingestion Key in your environment file:
```
INSPECTOR_INGESTION_KEY=[ingestion key]
```You can obtain an `INSPECTOR_INGESTION_KEY` creating a new project in your [Inspector](https://www.inspector.dev) account.
### Attach the Middleware
To monitor web requests you can attach the `WebMonitoringMiddleware` in your http kernel or use in one or more route groups based on your personal needs.
```php
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
...,
\Inspector\Laravel\Middleware\WebRequestMonitoring::class,
],'api' => [
...,
\Inspector\Laravel\Middleware\WebRequestMonitoring::class,
]
```### Test everything is working
Run the command below:
```
php artisan inspector:test
```Go to [https://app.inspector.dev/home](https://app.inspector.dev/home) to explore your data.
## Official documentation
**[Check out the official documentation](https://docs.inspector.dev/guides/laravel)**
## Contributing
We encourage you to contribute to Inspector! Please check out the [Contribution Guidelines](CONTRIBUTING.md) about how to proceed. Join us!
## LICENSE
This package is licensed under the [MIT](LICENSE) license.