request-atlas/laravel 问题修复 & 功能扩展

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

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

request-atlas/laravel

Composer 安装命令:

composer require request-atlas/laravel

包简介

A Laravel package to capture and inspect request execution traces.

README 文档

README

A high-precision execution profiler providing a hierarchical view of the request lifecycle.

Request Atlas captures the complete execution flow of your Laravel applications—mapping database queries, cache operations, outbound HTTP calls, and application events into a structured "Execution Tree". Inspect your request's "Story" directly from your terminal or through a polished, educational Web UI.

🚀 Why Request Atlas?

Most profilers tell you what happened (flat lists) or what was slow (flamegraphs). Atlas tells you how it happened.

  • Hierarchical Context: See exactly which controller method or middleware triggered which database query.
  • CLI-First: Designed for developers who live in the terminal. No browser required.
  • Educational Web UI: A "Junior-First" approach to performance, explaining the Laravel lifecycle as it happens.
  • IDE Integration: Open files directly in your favorite editor (VS Code, Cursor, Trae, PhpStorm, or Antigravity) from the trace view.
  • Production Ready: "Smart Disable" in production, request sampling, and high-performance cursor pagination.
  • Data Scrubbing: Automatically masks sensitive information (passwords, tokens, keys) before saving to the database.
  • Zero-Config Installation: One command and you're tracing.

🛠 Features

  • Full Lifecycle Tracing: Captures everything from the public index.php to the final terminating cleanup.
  • Execution Tree: Automatically reconstructs parent-child relationships using a LIFO context stack.
  • Deep Database Insight: Records SQL, interpolates bindings, detects N+1 patterns, and groups queries by table.
  • Comparison Dashboard: Side-by-side analysis of two traces with a categorical performance breakdown and duration gap indicators.
  • Interactive Story: A visual flow of your request, explaining the Laravel phases (Entry Point, Middleware, Controller, etc.).
  • Multi-Language: Fully localized for English and Arabic.

📋 Requirements

Before installing, ensure your environment meets the following criteria:

  • PHP: 8.0 - 8.5
  • Laravel: 8.x, 9.x, 10.x, 11.x, or 12.x
  • Database: Any SQL-based driver supported by Laravel (MySQL, PostgreSQL, SQLite, SQL Server)
  • Browser: Modern browser with JavaScript enabled (for the Web UI)

📦 Installation

  1. Install via Composer:

    composer require request-atlas/laravel
  2. Run the Automated Setup:

    php artisan atlas:install

    This will publish the configuration, run migrations, and enable the collector in your .env.

💻 Terminal Usage

Atlas provides a suite of powerful Artisan commands for fast, pipe-friendly inspection.

1. Listing Recent Traffic

php artisan atlas:list

Options: --slow, --failed, --has-n-plus-one, --limit=50.

2. The Execution Tree

php artisan atlas:show {trace_id}

Shows a hierarchical tree. Use --simple to hide framework noise (migrations, internal events).

3. Performance Analysis

php artisan atlas:analyze {trace_id}

Runs a diagnostic report: detects slow operations and highlights specific N+1 query candidates.

🌐 Web Interface

Accessible at /atlas, the Web UI is designed for deep exploration.

IDE Integration

Every file path in the UI (Controllers, Views, Entry Point) features an "Open in IDE" dropdown, allowing you to quickly jump to the code in VS Code, Cursor, Trae, PhpStorm, or Antigravity.

Comparison Mode

Select two traces from the index and click Compare.

  • Performance Gap: Shows exactly how much faster or slower the new request is.
  • Categorical Breakdown: Compare the number of DB queries, cache hits, and events side-by-side.

Maintenance & Scalability

  • Clear All: A dedicated button in the Web UI to wipe the trace history (equivalent to atlas:clear).
  • Infinite Loading: The index uses high-performance cursor pagination with a "Load More" button, making it snappy even with millions of records.

⚙️ Configuration

The config/atlas.php file allows you to fine-tune Atlas:

  • enabled: Master switch. Defaults to null, which automatically disables Atlas in production for safety.
  • sample_rate: Control how many requests are recorded (e.g., 0.1 for 10%).
  • scrubbing: Define sensitive keys to be masked (e.g., password, _token).
  • ignore: Define SQL or Route patterns to skip.
  • view: Control the "Internal Noise" filtering.
  • events: Group framework-internal events to reduce noise.

🤝 Atlas vs Laravel Telescope?

Feature Request Atlas Laravel Telescope
Primary Goal Hierarchy & Flow Feature Monitoring
Question it answers "How did this happen?" "What happened?"
Best for Debugging & Learning General Auditing
Footprint Ultra-Lightweight Medium/Heavy

request-atlas/laravel 适用场景与选型建议

request-atlas/laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 6, 最近一次更新时间为 2025 年 12 月 27 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 request-atlas/laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 request-atlas/laravel 我们能提供哪些服务?
定制开发 / 二次开发

基于 request-atlas/laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 30
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-27