定制 fixstack/laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

fixstack/laravel

Composer 安装命令:

composer require fixstack/laravel

包简介

Laravel SDK for FixStack — AI-powered error monitoring and debugging

README 文档

README

AI-powered error monitoring for Laravel applications. Captures exceptions and sends them to the FixStack platform for automated root cause analysis.

Requirements

  • PHP 8.1+
  • Laravel 10, 11, or 12

Installation

composer require fixstack/laravel

The service provider is auto-discovered — no manual registration needed.

Configuration

  1. Add your credentials to .env:
FIXSTACK_API_KEY=pk_your_api_key_here
FIXSTACK_ENDPOINT=https://app.fixstack.dev
  1. (Optional) Publish the config file:
php artisan vendor:publish --tag=fixstack-config
  1. Test the connection:
php artisan fixstack:test

Usage

The SDK automatically captures all unhandled exceptions. No code changes required.

Breadcrumbs

Track user actions leading up to an error:

use FixStack\Laravel\FixStack;

FixStack::breadcrumb('User clicked checkout', 'user-action');
FixStack::breadcrumb('Payment processing started', 'payment');
FixStack::breadcrumb('Stripe API called', 'http');

Breadcrumbs are attached to the next error that occurs and provide context for AI analysis.

What Gets Captured

Each error report includes:

  • Exception: class name, message, full stack trace
  • Request: URL, HTTP method, headers, body (sensitive fields redacted)
  • User: authenticated user ID and email
  • App: Laravel version, PHP version, environment
  • Breadcrumbs: recent actions leading up to the error

Configuration Options

Option Env Variable Default Description
enabled FIXSTACK_ENABLED true Enable/disable error reporting
endpoint FIXSTACK_ENDPOINT https://app.fixstack.dev Platform API URL
api_key FIXSTACK_API_KEY Project API key (from Settings)
async FIXSTACK_ASYNC true Send errors via queue (recommended)
queue_connection FIXSTACK_QUEUE null Queue connection (null = default)
sample_rate FIXSTACK_SAMPLE_RATE 1.0 0.0–1.0, percentage of errors to report
environments ['production', 'staging'] Only report in these environments
timeout 5 HTTP timeout in seconds

Ignored Exceptions

By default, the following exceptions are not reported:

  • Illuminate\Auth\AuthenticationException
  • Illuminate\Validation\ValidationException
  • Symfony\Component\HttpKernel\Exception\NotFoundHttpException

Customize in config/fixstack.php:

'ignored_exceptions' => [
    \Illuminate\Auth\AuthenticationException::class,
    \Illuminate\Validation\ValidationException::class,
    \Symfony\Component\HttpKernel\Exception\NotFoundHttpException::class,
    \App\Exceptions\IgnoredException::class, // your own
],

Data Sanitization

Sensitive data is automatically redacted before sending. Configure patterns in config/fixstack.php:

// Headers containing these strings are redacted
'sanitize_headers' => ['authorization', 'cookie', 'x-api-key'],

// Body fields containing these strings are redacted
'sanitize_body' => ['password', 'token', 'secret', 'credit_card', 'ssn'],

Async vs Sync

Async (default): Errors are sent via a queued job. Zero performance impact on your application. Requires a queue worker running (php artisan queue:work).

Sync: Errors are sent immediately during the request. Useful for testing or when no queue is available. Set FIXSTACK_ASYNC=false.

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固