PHPackages                             rapidez/sentry - 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. rapidez/sentry

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

rapidez/sentry
==============

Sentry integration in Rapidez

5.0.0(3mo ago)04.8k↓44.1%1[1 PRs](https://github.com/rapidez/sentry/pulls)GPL-3.0JavaScriptPHP ^8.1

Since Jul 19Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/rapidez/sentry)[ Packagist](https://packagist.org/packages/rapidez/sentry)[ Docs](https://github.com/rapidez/sentry)[ RSS](/packages/rapidez-sentry/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (24)Used By (0)

Rapidez Sentry
==============

[](#rapidez-sentry)

This package integrates Sentry Laravel and Sentry Vue into a Rapidez project.

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

[](#installation)

```
yarn add @sentry/vue --dev
composer require rapidez/sentry

```

You will need to add the following lines to your .env:

```
SENTRY_LARAVEL_DSN=___PUBLIC_DSN___
VITE_SENTRY_DSN="${SENTRY_LARAVEL_DSN}"

```

You don't need the `VITE_SENTRY_DSN` line if you don't want to use the Sentry Vue package. Note that setting your Sentry DSN to be public like this is [safe](https://docs.sentry.io/concepts/key-terms/dsn-explainer/).

You can disable the Vue package in your .env by adding:

```
SENTRY_VUE_ENABLED=false

```

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

[](#configuration)

You can publish the (vue-specific) config with:

```
php artisan vendor:publish --tag=rapidez-sentry-config

```

Some basic configuration settings for Vue can also be set in your env, for example:

```
SENTRY_VUE_SAMPLE_RATE=50
SENTRY_VUE_INTEGRATION_REPLAY=true

```

Check out the [sentry/sentry-laravel readme](https://github.com/getsentry/sentry-laravel) for configuration of the laravel package.

### Hooking into the beforeSend method

[](#hooking-into-the-beforesend-method)

This package provides a way to hook into [the beforeSend method](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/filtering/#using-before-send) by using the `useBeforeSendHandlers` store. This can be used in the following way:

```
import { addBeforeSendMethodHandler } from 'Vendor/rapidez/sentry/resources/js/stores/useBeforeSendHandlers'

[...]

addBeforeSendMethodHandler((event) => {
    if (event.user) {
        delete event.user.email
    }
    return event
})
```

Note that event handlers will be run in the order that they have been added, as changes made within these handlers need to be carried over.

To drop the event completely, you can return `null`. Note that this means you need to always return the event if you don't want it to be dropped.

Testing
-------

[](#testing)

Errors thrown directly from the browser console don't get caught by Sentry, so you can test whether or not the frontend error reporting works by sending a test error in the browser console with:

```
document.dispatchEvent(new Event('sentry-test-error'))
```

This functionality can be disabled in your `.env`:

```
VITE_SENTRY_VUE_ALLOW_TEST_ERRORS=false

```

Deprecating older browsers
--------------------------

[](#deprecating-older-browsers)

You may end up having a lot of errors caused by people using really old browsers that don't support some more modern widely supported functions. To combat this, you can use the `deprecations` section in the configuration file:

```
'deprecations' => [
    'String.prototype.replaceAll',
    'Array.prototype.at',
]
```

Before initializing Sentry, this package will first check whether any of the given variables/functions are nullish (null or undefined). These are checked with `window` as the base variable.
If *any* of them end up being nullish, Sentry will not be loaded and frontend errors will not be logged.

Filtering errors
----------------

[](#filtering-errors)

You can use the standard Sentry configuration for `ignoreErrors` as described in the [sentry documentation](https://docs.sentry.io/platforms/javascript/guides/vue/configuration/filtering/#using-ignore-errors).

This can be done in the configuration file like so:

```
'ignoreErrors' => [
    'AbortError',
    '_isDestroyed',
],
```

Linking frontend errors to Magento Errors (Distributed Tracing)
---------------------------------------------------------------

[](#linking-frontend-errors-to-magento-errors-distributed-tracing)

For full observability you may want to connect your frontend errors and sessions to the thrown Magento errors. This could give benefits like showing where in a Replay an error occurred in Magento.

For this you must first install the [Magento2 Sentry module](https://github.com/justbetter/magento2-sentry)

Then add the following to your Rapidez `.env`

```
SENTRY_VUE_SAMPLE_RATE=10 # A percentage is required here (0 is allowed as well)
SENTRY_VUE_INTEGRATION_BROWSER_TRACING=true
SENTRY_VUE_INTEGRATION_HTTP_CLIENT=true
SENTRY_VUE_INTEGRATION_GRAPHQL_CLIENT=true
SENTRY_VUE_INTEGRATION_REPLAY=true
```

With this enabled you must make sure the `sentry-trace,baggage,traceparent` headers are allowed in your Magento (and if applicable Rapidez) CORS config

Then in Magento make sure to enable "Tracing", "Performance tracking", and to set a "Traces sample rate" (0 is allowed)

With this set up your Rapidez and Magento Sentry should be linked with each other.

License
-------

[](#license)

GNU General Public License v3. Please see [License File](LICENSE) for more information.

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance86

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~32 days

Recently: every ~0 days

Total

19

Last Release

95d ago

Major Versions

3.1.0 → 4.0.02025-06-05

3.2.1 → 4.1.22025-11-11

4.1.2 → 5.0.02026-02-13

3.3.0 → 4.2.02026-02-13

3.x-dev → 4.x-dev2026-02-13

PHP version history (2 changes)1.0.0PHP ^8.1|^8.2|^8.3

4.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/72222911?v=4)[Rapidez](/maintainers/rapidez)[@rapidez](https://github.com/rapidez)

---

Top Contributors

[![royduin](https://avatars.githubusercontent.com/u/1703233?v=4)](https://github.com/royduin "royduin (18 commits)")[![Jade-GG](https://avatars.githubusercontent.com/u/32514269?v=4)](https://github.com/Jade-GG "Jade-GG (16 commits)")[![indykoning](https://avatars.githubusercontent.com/u/15870933?v=4)](https://github.com/indykoning "indykoning (9 commits)")

---

Tags

sentryrapidez

### Embed Badge

![Health badge](/badges/rapidez-sentry/health.svg)

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

###  Alternatives

[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k227.1M273](/packages/sentry-sentry)[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.3k114.3M154](/packages/sentry-sentry-laravel)[sentry/sentry-symfony

Symfony integration for Sentry (http://getsentry.com)

73661.4M66](/packages/sentry-sentry-symfony)[sentry/sdk

This is a meta package of sentry/sentry. We recommend using sentry/sentry directly.

328134.8M151](/packages/sentry-sdk)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)[notamedia/yii2-sentry

Yii2 logger for Sentry

1272.0M2](/packages/notamedia-yii2-sentry)

PHPackages © 2026

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