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.4.0(2mo ago)164.7k↑61.2%2MITPHPPHP ^8.0

Since Apr 7Pushed 2mo 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 2w ago

READMEChangelogDependencies (16)Versions (9)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

51

—

FairBetter than 95% of packages

Maintenance87

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 79.4% 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 ~255 days

Recently: every ~302 days

Total

7

Last Release

65d 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 (27 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 (3 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

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

79227.1M238](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[intervention/image-laravel

Laravel Integration of Intervention Image

1589.8M227](/packages/intervention-image-laravel)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)

PHPackages © 2026

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