PHPackages                             wyox/laravel-gitlab-reporter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. wyox/laravel-gitlab-reporter

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

wyox/laravel-gitlab-reporter
============================

Creates Gitlab Issues when Exceptions are thrown

3.0.0(2w ago)96.1k1[1 PRs](https://github.com/Wyox/laravel-gitlab-reporter/pulls)MITPHPPHP &gt;=8.2CI failing

Since Jul 4Pushed 2w ago2 watchersCompare

[ Source](https://github.com/Wyox/laravel-gitlab-reporter)[ Packagist](https://packagist.org/packages/wyox/laravel-gitlab-reporter)[ RSS](/packages/wyox-laravel-gitlab-reporter/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (11)Versions (22)Used By (0)

Laravel Gitlab Report
=====================

[](#laravel-gitlab-report)

Create issues for Exceptions that happen on your servers.

This package will create issues in your Gitlab project if Exceptions occur and will post some more debug information to the issue to help you solve problems.

This package will contact your Gitlab server and checks if an exception has occurred before based on a generated identifier hash in the issue description. Don't remove this line in the description as it will be the only way for this package to validate if an exception occurred before.

Gitlab version 9 or higher required.

Installation
============

[](#installation)

Install with composer

```
composer require wyox/laravel-gitlab-reporter
```

This package supports Laravel 12 and 13 (PHP 8.2 or higher).

To use the Gitlab reporter, open your `bootstrap/app.php` and add the code shown below between the comments to the withExceptions closure

```
    ->withExceptions(function (Exceptions $exceptions) {
        // ADD below
        $exceptions->report(function(\Throwable $e){
            if (app()->bound('gitlab.report')) {
                app('gitlab.report')->report($e);
            }
        });
        // ADD Above
    })
```

Now setup your .env file to include the following variables:

```
GITLAB_REPORT_URL=https://gitlab.com/
GITLAB_REPORT_TOKEN=
GITLAB_REPORT_PROJECT_ID=
GITLAB_REPORT_LABELS=
GITLAB_USE_CACHE=true

```

I would suggest making a separate user account for the reporter and only let it access Issues and allow it for issue creation. This way you can ensure if your server or code gets compromised you won't give full access to the server

To retrieve an access token go to your gitlab server to `profile/personal_access_tokens` and generate a token for using the API

For your Project ID you need to go to your project -&gt; Settings -&gt; General -&gt; General Project settings. There should be a box with Project ID

Adding labels to issues
=======================

[](#adding-labels-to-issues)

Adding labels to newly created issues is easy, just add a comma-separated list to `GITLAB_REPORT_LABELS=`

```
GITLAB_REPORT_LABELS=bug,critical

```

If the labels don't exist in Gitlab they will be automatically created.

Ignoring certain exceptions
===========================

[](#ignoring-certain-exceptions)

Make sure you publish the config as setting exceptions is not possible using an .env file

```
php artisan vendor:publish --tag=gitlab-report
```

A file called gitlab-report.php will be created there and you can change settings there. A couple of exceptions have been added by default

Hiding fields in reports
========================

[](#hiding-fields-in-reports)

In some cases you don't want reports to contain passwords of your clients. You can extend or replace values in the configuration file to include more fields that shouldn't show up in a report. All these fields will be replaced with \[redacted\]. Matching is case-insensitive, so `Authorization` and `authorization` are both redacted. A set of common sensitive field names (passwords, tokens, secrets, api keys, authorization, etc.) is redacted by default.

What's in a report
==================

[](#whats-in-a-report)

Each issue description is built from a number of sections:

- **Exception summary** - type, message, file/line and (for HTTP) the request method, URL and authentication state.
- **Context** - environment, Laravel/PHP version, host, timestamp and (for HTTP) client IP and user agent.
- **Code** - a source excerpt around the line that threw the exception.
- **SQL** - the failing query (only for `QueryException`).
- **Query params / POST / Session / User** - sanitized request data (HTTP only).
- **Trace** - the stack trace, followed by a **Caused by** section for every previous exception in the chain.

Duplicate issues and recurrences
================================

[](#duplicate-issues-and-recurrences)

Exceptions are deduplicated using a hash of the request/command, exception class and a normalized message (dynamic ids, UUIDs and hashes are masked) plus the file and line. When an open issue already exists for an exception, a throttled "occurred again" note is added to it instead of creating a duplicate. The throttling window is shared with the local cache (`GITLAB_USE_CACHE`).

###  Health Score

60

—

FairBetter than 98% of packages

Maintenance96

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity85

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~152 days

Recently: every ~425 days

Total

20

Last Release

18d ago

Major Versions

0.0.9 → 1.0.02020-02-03

1.2.0 → 2.0.02024-06-17

2.1.1 → 3.0.02026-06-16

PHP version history (6 changes)v0.0.2PHP &gt;=7.0

1.0.0PHP &gt;=7.1

1.2.0PHP &gt;=7.2

2.0.0PHP &gt;=8.0

2.1.0PHP &gt;=8.1

3.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4883983?v=4)[Ivo de Bruijn](/maintainers/wyox)[@Wyox](https://github.com/Wyox)

---

Top Contributors

[![Wyox](https://avatars.githubusercontent.com/u/4883983?v=4)](https://github.com/Wyox "Wyox (72 commits)")

---

Tags

error-reportinggitlab

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wyox-laravel-gitlab-reporter/health.svg)

```
[![Health](https://phpackages.com/badges/wyox-laravel-gitlab-reporter/health.svg)](https://phpackages.com/packages/wyox-laravel-gitlab-reporter)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[aeliot/todo-registrar

Register TODOs from source code in issue tracker

153.0k](/packages/aeliot-todo-registrar)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
