inspector-apm/inspector-laravel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

inspector-apm/inspector-laravel

最新稳定版本:4.18.3

Composer 安装命令:

composer require inspector-apm/inspector-laravel

包简介

Code Execution Monitoring, built for developers.

README 文档

README

Total Downloads Latest Stable Version License Contributor Covenant

Before moving on, please consider giving us a GitHub star ⭐️. Thank you!

Code Execution Monitoring for Laravel applications.

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:

$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 account.

Attach the Middleware

To monitor HTTP requests you should attach the WebMonitoringMiddleware in your http application route groups.

Laravel <= 10

/**
 * The application's route middleware groups.
 *
 * @var array
 */
protected $middlewareGroups = [
    'web' => [
        ...,
        \Inspector\Laravel\Middleware\WebRequestMonitoring::class,
    ],

    'api' => [
        ...,
        \Inspector\Laravel\Middleware\WebRequestMonitoring::class,
    ]
];

Laravel >= 11

use \Inspector\Laravel\Middleware\WebRequestMonitoring;

return Application::configure(basePath: dirname(__DIR__))
    ->withMiddleware(function (Middleware $middleware) {
        // Append the middleware
        $middleware->appendToGroup('web', WebRequestMonitoring::class)
            ->appendToGroup('api', WebRequestMonitoring::class);
    })
    ->create();

Test everything is working

Run the command below:

php artisan inspector:test

Go to https://app.inspector.dev to explore your data.

Official documentation

Check out the official documentation

Contributing

We encourage you to contribute to Inspector! Please check out the Contribution Guidelines about how to proceed. Join us!

LICENSE

This package is licensed under the MIT license.

统计信息

  • 总下载量: 1.82M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 233
  • 点击次数: 3
  • 依赖项目数: 2
  • 推荐数: 1

GitHub 信息

  • Stars: 230
  • Watchers: 3
  • Forks: 21
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固