PHPackages                             naugrim/laravel-sentry-tunnel - 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. naugrim/laravel-sentry-tunnel

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

naugrim/laravel-sentry-tunnel
=============================

Provides an endpoint to use the `tunnel`-parameter of the Sentry SDK

1.3.0(7mo ago)155.9k↑34.1%2MITPHPPHP ^8.0

Since Apr 7Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/Naugrimm/laravel-sentry-tunnel)[ Packagist](https://packagist.org/packages/naugrim/laravel-sentry-tunnel)[ RSS](/packages/naugrim-laravel-sentry-tunnel/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (8)Versions (8)Used By (0)

Laravel Sentry Tunnel
=====================

[](#laravel-sentry-tunnel)

This package provides a URL for use with the [`tunnel`-option](https://docs.sentry.io/platforms/javascript/troubleshooting/#using-the-tunnel-option) of the Sentry SDK.

Installation
------------

[](#installation)

```
composer require naugrim/laravel-sentry-tunnel
```

The package uses Laravel's [auto-discovery](https://laravel.com/docs/9.x/packages#package-discovery).

Configuration
-------------

[](#configuration)

You can optionally publish the configuration files:

```
php artisan vendor:publish --provider=Naugrim\\LaravelSentryTunnel\\Provider
```

You **must** place at least one allowed host in your `.env` file:

```
SENTRY_TUNNEL_ALLOWED_HOSTS=my.host.com
```

**NOTE**: This essentially creates a reverse proxy to the `SENTRY_TUNNEL_ALLOWED_HOSTS`. As the Sentry DSN is not kept secret, this enables everyone to send messages to these hosts that seem to originate from your server.

Therefore, the default middleware list for the tunnel URL includes `web` and `auth` (so that only authenticated users can use the endpoint).

As you currently cannot pass a dynamic `X-XSRF-TOKEN` header in Sentry's `transportOptions` you either have to implement your own transport or place the tunnel URL in the exclude-list in the `VerifyCsrfToken` middleware.

If you want to change this behavior, provide a custom implementation of `\Naugrim\LaravelSentryTunnel\Contracts\MiddlewareList` via the container:

```
// app/Services/MyMiddlewareList.php

namespace App\Services;

use Naugrim\LaravelSentryTunnel\Services\MiddlewareList;

class MyMiddlewareList extends MiddlewareList
{
    public function getMiddlewareList() : array{
        return array_merge(
            parent::getMiddlewareList(),
            [
                "throttle",
            ]
        );
    }
}
```

Then add it to the container in your `AppServiceProvider`:

```
// app/Providers/AppServiceProvider.php

use Illuminate\Support\ServiceProvider;
use Naugrim\LaravelSentryTunnel\Contracts\MiddlewareList;
use App\Services\MyMiddlewareList;

class AppServiceProvider extends ServiceProvider
{
    public function register(){
        $this->app->alias(MyMiddlewareList::class, MiddlewareList::class);
    }
}
```

Optionally you can restrict the project IDs that are allowed to use this endpoint. The default behavior is to allow all projects.

```
SENTRY_TUNNEL_ALLOWED_PROJECTS=1234,456,78
```

You can change the URL of the tunnel if required. The default value is `/sentry/tunnel`

```
SENTRY_TUNNEL_URL="/super/secret/tunnel"
```

Usage
-----

[](#usage)

Consult [Sentry's documentation](https://docs.sentry.io/platforms/javascript/troubleshooting/#using-the-tunnel-option).

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance62

Regular maintenance activity

Popularity32

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 82.8% 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 ~253 days

Recently: every ~316 days

Total

6

Last Release

236d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2101878?v=4)[naugrim](/maintainers/naugrim)[@Naugrim](https://github.com/Naugrim)

---

Top Contributors

[![Naugrimm](https://avatars.githubusercontent.com/u/5753604?v=4)](https://github.com/Naugrimm "Naugrimm (24 commits)")[![asbiin](https://avatars.githubusercontent.com/u/25419741?v=4)](https://github.com/asbiin "asbiin (4 commits)")[![utkinn](https://avatars.githubusercontent.com/u/12773022?v=4)](https://github.com/utkinn "utkinn (1 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/naugrim-laravel-sentry-tunnel/health.svg)

```
[![Health](https://phpackages.com/badges/naugrim-laravel-sentry-tunnel/health.svg)](https://phpackages.com/packages/naugrim-laravel-sentry-tunnel)
```

###  Alternatives

[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[masterro/laravel-mail-viewer

Easily view in browser outgoing emails.

6392.1k](/packages/masterro-laravel-mail-viewer)

PHPackages © 2026

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