ciplnew / bugtracking
Report Laravel exceptions to the BugTrack Go API
Requires
- php: ^8.1
- ext-curl: *
- ext-json: *
- illuminate/support: ^10.0|^11.0|^12.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-09-16 13:15:33 UTC
README
Reports Laravel exceptions to the Go BugTrack API (POST /api/v1/ingest).
This package no longer talks to the old Python endpoint at https://bugtracking.colanapps.in/api/bugtrack/.
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
- A running BugTrack Go API (default
http://127.0.0.1:8080) - A project API key from the BugTrack dashboard
Install
Packagist has no tagged releases yet, so require dev-main from GitHub:
composer config repositories.bugtrack vcs https://github.com/cipl-sheik/bugtrack-laravel.git composer require ciplnew/bugtracking:dev-main
That is the full install. Laravel package auto-discovery registers BugTrackServiceProvider. Exceptions are reported automatically.
Do not add any of the following (those were for the old Python package):
Ciplnew\BugTracking\BugTrackServiceProvider::classinconfig/app.phporbootstrap/providers.phpBugTrackController::bugTrack($e)inbootstrap/app.phporapp/Exceptions/Handler.php
If auto-discovery is disabled, register the provider only:
Laravel 12 / 11 (bootstrap/providers.php):
return [ App\Providers\AppServiceProvider::class, Ciplnew\BugTracking\BugTrackServiceProvider::class, ];
Laravel 10 (config/app.php):
Ciplnew\BugTracking\BugTrackServiceProvider::class,
Publish config (optional):
php artisan vendor:publish --tag=bugtracking-config
Configure
In the host app .env:
BUGTRACK_ENABLED=true BUGTRACK_DSN=http://YOUR_PROJECT_KEY@127.0.0.1:8080/1 BUGTRACK_ENVIRONMENT=local
Or URL + key:
BUGTRACK_URL=http://127.0.0.1:8080/api/v1/ingest BUGTRACK_KEY=YOUR_PROJECT_KEY
BUG_TRCAK_KEY is still read as a fallback so existing env files keep working. A key alone is not enough to hit the old Python site — set BUGTRACK_DSN or BUGTRACK_URL to your Go API.
What is sent
JSON matching the Go ingest contract:
exception.type/exception.message/exception.file/exception.linestacktraceframesrequest,user,runtime,sdkX-Bugtrack-Key(andAuthorization: Bearer)
Validation, auth, CSRF, and HTTP 4xx errors are not reported.
Reporting is fire-and-forget. If the Go API is down, the original Laravel error is unchanged.
Migrating an app that used the Python package
composer require ciplnew/bugtracking:dev-main(with the GitHubrepositoriesentry above).- Remove
BugTrackController::bugTrack($e)frombootstrap/app.php/Handler.php. - Remove the extra provider line if auto-discovery is enabled.
- Replace the colanapps Python URL with the Go DSN or
BUGTRACK_URL. - Keep
BUG_TRCAK_KEYor rename it toBUGTRACK_KEY.
Legacy Handler.php
Older installs called:
\Ciplnew\BugTracking\BugTrackController::bugTrack($e);
That method still works and now posts to the Go API. Remove it if the service provider is registered, or the same exception may be sent twice (the reporter de-dupes by object id within a request).