PHPackages                             wieni/wmsentry - 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. wieni/wmsentry

ActiveDrupal-module

wieni/wmsentry
==============

A module for sending errors to Sentry in Drupal 9.

2.2.0(11mo ago)031.2k↓43.5%2[5 issues](https://github.com/wieni/wmsentry/issues)MITPHPPHP ^8.0

Since Feb 12Pushed 11mo ago4 watchersCompare

[ Source](https://github.com/wieni/wmsentry)[ Packagist](https://packagist.org/packages/wieni/wmsentry)[ RSS](/packages/wieni-wmsentry/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (33)Used By (0)

wmsentry
========

[](#wmsentry)

[![Latest Stable Version](https://camo.githubusercontent.com/08b9b078da7115672bd8fd48eb2e8bc1be081b12e27e70d664a98746e2426284/68747470733a2f2f706f7365722e707567782e6f72672f7769656e692f776d73656e7472792f762f737461626c65)](https://packagist.org/packages/wieni/wmsentry)[![Total Downloads](https://camo.githubusercontent.com/50636d507e5c496120d5e194fc5ebe50c94abff20fd9629357bdf68aa8b209ed/68747470733a2f2f706f7365722e707567782e6f72672f7769656e692f776d73656e7472792f646f776e6c6f616473)](https://packagist.org/packages/wieni/wmsentry)[![License](https://camo.githubusercontent.com/e0530809f909c2a248f13f85150ebc6fcb9ea8f51cbcfb373d1d2b1790d009cc/68747470733a2f2f706f7365722e707567782e6f72672f7769656e692f776d73656e7472792f6c6963656e7365)](https://packagist.org/packages/wieni/wmsentry)

> A module for sending errors to Sentry in Drupal 9.

Why?
----

[](#why)

- We use [Sentry](https://sentry.io) to monitor our sites and to track errors
- We couldn't find an existing (stable) module for integrating Sentry with Drupal, using v2 of the Sentry SDK.

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

[](#installation)

This module requires PHP 8.0 or higher and uses the Sentry PHP package ([`sentry/sentry`](https://github.com/getsentry/sentry-php)), which is not tied to any specific library that sends HTTP messages. Instead, it uses [Httplug](https://github.com/php-http/httplug) to let users choose whichever PSR-7 implementation and HTTP client they want to use.

If you just want to get started quickly you should run the following command:

```
composer require wieni/wmsentry nyholm/psr7 php-http/guzzle6-adapter
```

For more information, please refer to the *Install* section of the [`sentry/sentry-php`](https://github.com/getsentry/sentry-php#install) repository README.

How does it work?
-----------------

[](#how-does-it-work)

### Configuration

[](#configuration)

Once enabled, you can configure the module through the settings form at `/admin/config/development/logging/sentry`.

To change the configuration of the module, users need the permission `administer wmsentry settings`.

To dynamically set the environment, release or other config values, you can override the config in settings.php:

```
$config['wmsentry.settings'] = [
    'dsn' => $_ENV['SENTRY_DSN'],
    'environment' => $_SERVER['APP_ENV'],
];
```

### Events

[](#events)

#### `Drupal\wmsentry\WmsentryEvents::BEFORE_BREADCRUMB`

[](#drupalwmsentrywmsentryeventsbefore_breadcrumb)

This function is called before the breadcrumb is added to the scope. When nothing is returned from the function the breadcrumb is dropped. The callback typically gets a second argument (called a “hint”) which contains the original object that the breadcrumb was created from to further customize what the breadcrumb should look like.

#### `Drupal\wmsentry\WmsentryEvents::BEFORE_SEND`

[](#drupalwmsentrywmsentryeventsbefore_send)

This function can return a modified event object or nothing to skip reporting the event. This can be used for instance for manual PII stripping before sending.

#### `Drupal\wmsentry\WmsentryEvents::SCOPE_ALTER`

[](#drupalwmsentrywmsentryeventsscope_alter)

This function is called before the scope is added to the captured event. The scope holds data that should implicitly be sent with Sentry events. It can hold context data, extra parameters, level overrides, fingerprints etc.

#### `Drupal\wmsentry\WmsentryEvents::OPTIONS_ALTER`

[](#drupalwmsentrywmsentryeventsoptions_alter)

This function is called before the client is created with an options object. The options object is a configuration container for the Sentry client.

### Setting the release ID through an HTTP endpoint

[](#setting-the-release-id-through-an-http-endpoint)

This module provides an HTTP endpoint that can be used to set the Sentry release ID without being logged in. This can be useful when creating a new Sentry release through the API, eg. in a CI pipeline.

The endpoint is `/sentry/set-release` and is secured in the same way as the `core/rebuild.php` script (see [documentation](https://www.drupal.org/node/2153725)). The release ID can be passed using the `release` query parameter. Here's an example call:

```
/sentry/set-release?release=exampleproject@62d50f53&timestamp=1614934032&token=XXE6H4wwVC6x5I6QnTPFTj-hSksNfgUpndv9X-3lC7Y

```

Changelog
---------

[](#changelog)

All notable changes to this project will be documented in the [CHANGELOG](CHANGELOG.md) file.

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

Distributed under the MIT License. See the [LICENSE](LICENSE) file for more information.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance50

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 90.6% 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 ~79 days

Recently: every ~362 days

Total

30

Last Release

349d ago

Major Versions

1.7.5 → 2.0.02021-08-24

PHP version history (3 changes)1.0.0PHP &gt;=7.2.0

1.6.0PHP ^7.2 || ^8.0

2.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/734199ae17f8da336fef9ba81f7c37cda09b0f9a952f551235c32ecfad68488b?d=identicon)[Wieni](/maintainers/Wieni)

---

Top Contributors

[![DieterHolvoet](https://avatars.githubusercontent.com/u/3606531?v=4)](https://github.com/DieterHolvoet "DieterHolvoet (58 commits)")[![RobinHoutevelts](https://avatars.githubusercontent.com/u/9056689?v=4)](https://github.com/RobinHoutevelts "RobinHoutevelts (3 commits)")[![akasake](https://avatars.githubusercontent.com/u/32063989?v=4)](https://github.com/akasake "akasake (2 commits)")[![ponkiwonki](https://avatars.githubusercontent.com/u/106490855?v=4)](https://github.com/ponkiwonki "ponkiwonki (1 commits)")

---

Tags

crash-reportingdrupal-8drupal-moduledrupal8-moduleravensentrysentry-client

### Embed Badge

![Health badge](/badges/wieni-wmsentry/health.svg)

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

###  Alternatives

[sentry/sentry-laravel

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

1.3k114.3M154](/packages/sentry-sentry-laravel)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6939.5M343](/packages/drupal-core-recommended)

PHPackages © 2026

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