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

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

rootpd/nette-sentry
===================

Nette Sentry logger library

2.3.2(5mo ago)9114.7k↓35%11[1 PRs](https://github.com/rootpd/nette-sentry/pulls)1MITPHPPHP ^8.1CI passing

Since Feb 3Pushed 5mo ago1 watchersCompare

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

READMEChangelog (4)Dependencies (8)Versions (16)Used By (1)

Nette Sentry
============

[](#nette-sentry)

[![Build Status](https://camo.githubusercontent.com/8e701838ebeb54d217d03a7ab6d9b5ed0e86f47ca7dfd4b08d9b41da5d446c43/68747470733a2f2f6170702e7472617669732d63692e636f6d2f726f6f7470642f6e657474652d73656e7472792e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/rootpd/nette-sentry)

Tracy logger extension capable of logging messages and errors to Sentry.

*Note*: If you have debug mode enabled in your application, logger will only send `\Tracy\Debugger::log()` messages to sentry. Any exception ending with Tracy's blue screen is not going to be logged as you can see the exception details directly.

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

[](#installation)

Install package via Composer:

```
composer require rootpd/nette-sentry

```

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

[](#configuration)

Enable and configure the extension in Nette config file:

```
extensions:
	# ...
	sentry: Rootpd\NetteSentry\DI\SentryExtension

sentry:
    dsn: https://123abc123abc123abc123abc123abc12@sentry.io/3 # required
    environment: production # optional, defaults to "local"
    user_fields: # optional, defaults to empty array; Nette's identity ID is being sent automatically
        - email
    session_sections: # optional, list of session sections to track
        - mySection
    priority_mapping: # optional, mapping of custom log levels to ones that's Sentry aware of
        mypriority: warning

    db_tracing: true # optional, defaults to "false", wraps DB connection so it adds span for every query
```

### Priority-Severity mapping

[](#priority-severity-mapping)

Sometimes you might need to use custom *priority* when logging the error in Nette:

```
\Tracy\Debugger::log('foo', 'mypriority');
```

Sentry only allows strict set of severities. By default any message with unknown (non-standard) severity is not being logged.

You can map your custom *priority* to Sentry's *severity* in config by using `priority_mapping` as shown in the example.

The allowed set of Sentry severities can be checked in [Sentry's PHP repository](https://github.com/getsentry/sentry-php/blob/master/src/Severity.php).

Usage
-----

[](#usage)

Once enabled as extension, you can continue to throw exceptions without any change. To log message please use `\Tracy\Debugger::log()` method.

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance73

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 82.1% 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 ~153 days

Recently: every ~182 days

Total

15

Last Release

150d ago

Major Versions

1.4.0 → 2.0.02022-12-28

PHP version history (5 changes)1.0.0PHP ^7.1

1.2.0PHP ^7.2

1.4.0PHP ^7.2 || ^8.0

2.0.0PHP ^8.0

2.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c733f9bd683c3814197d8a532b7da1ba1f631bb1efe1cde5f064feab1e24877?d=identicon)[rootpd](/maintainers/rootpd)

---

Top Contributors

[![rootpd](https://avatars.githubusercontent.com/u/812909?v=4)](https://github.com/rootpd "rootpd (23 commits)")[![martenb](https://avatars.githubusercontent.com/u/13311472?v=4)](https://github.com/martenb "martenb (3 commits)")[![markoph](https://avatars.githubusercontent.com/u/6843562?v=4)](https://github.com/markoph "markoph (2 commits)")

---

Tags

netteerrorssentryerrorlogger

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[sentry/sentry-symfony

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

73661.4M66](/packages/sentry-sentry-symfony)[facile-it/sentry-module

This module allows integration of Sentry Client into laminas and mezzio

19372.5k](/packages/facile-it-sentry-module)

PHPackages © 2026

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