PHPackages                             james-and-james-fulfilment/amg-sentry-plugin - 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. james-and-james-fulfilment/amg-sentry-plugin

AbandonedArchivedSymfony1-plugin[Logging &amp; Monitoring](/categories/logging)

james-and-james-fulfilment/amg-sentry-plugin
============================================

Symfony 1.x plugin for Sentry.

v1.1.2(4y ago)18.3k1MITPHP

Since Apr 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/JamesAndJamesFulfilment/symfony-amg-sentry-plugin)[ Packagist](https://packagist.org/packages/james-and-james-fulfilment/amg-sentry-plugin)[ Docs](https://github.com/JamesAndJamesFulfilment/symfony-amg-sentry-plugin)[ RSS](/packages/james-and-james-fulfilment-amg-sentry-plugin/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

symfony's amgSentryPlugin
=========================

[](#symfonys-amgsentryplugin)

The `amgSentryPlugin` is a Symfony 1.4 plugin for the Sentry PHP client.

This plugin is based on the Sentry PHP client library [sentry-php](https://github.com/getsentry/sentry-php).

Requirements
------------

[](#requirements)

- PHP ≥ 5.2
- symfony ≥ 1.4
- Sentry instance

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

[](#installation)

In the `plugins` folder of your symfony project.

### The Composer way

[](#the-composer-way)

Add the require to your composer.json. It's oddly named but like this Composer's symfony1 installer camelcases it correctly. Composer will install it into your project's plugins directory automatically, and add the requirements.

```
{
    "config": {
        "vendor-dir": "lib/vendor"
    },
    "require": {
        "amg-dev/amg-sentry-plugin": "dev-master"
    }
}
```

Of course, don't forget to add Composer's autoloader to your ProjectConfiguration:

```
// config/ProjectConfiguration.class.php

require __DIR__ .'/../lib/vendor/autoload.php';

require_once dirname(__FILE__) .'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
sfCoreAutoload::register();

class ProjectConfiguration extends sfProjectConfiguration
{
    public function setup()
    {
        $this->enablePlugins(array(
            'amgSentryPlugin',
            ...
        ));

        // mandatory because of the Composer vendor directory naming scheme
        sfConfig::set('sf_sentry_path', sfConfig::get('sf_lib_dir') . '/vendor/sentry/sentry');
    }
}
```

### Via git clone

[](#via-git-clone)

```
$ git clone git@github.com:amg-dev/symfony-amg-sentry-plugin.git plugins/amgSentryPlugin
$ cd plugins/amgSentryPlugin
$ git submodule update --init

```

### Via git submodule

[](#via-git-submodule)

```
$ git submodule add github.com:amg-dev/symfony-amg-sentry-plugin.git plugins/amgSentryPlugin
$ git submodule update --init --recursive

```

### Via zip archive

[](#via-zip-archive)

[Download](https://github.com/amg-dev/symfony-amg-sentry-plugin/archive/master.zip) and extract zip archive.

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

[](#configuration)

In your symfony project folder.

### Activate the plugin in `config/ProjectConfiguration.class.php`

[](#activate-the-plugin-in-configprojectconfigurationclassphp)

```
class ProjectConfiguration extends sfProjectConfiguration
{
	public function setup()
	{
		$this->enablePlugins(array(
			'sfDoctrinePlugin',
			'amgSentryPlugin',
			'...'
		));
	}
}
```

### Configure the plugin in `config/app.yml` (project and/or application level)

[](#configure-the-plugin-in-configappyml-project-andor-application-level)

```
prod:
  amg_sentry:
    enabled: true
    dsn: 'http://public:secret@sentry.example.com:9000/[PROJECT_ID]'
    logger: 'custom-logger-name'
    reportPHPErrors: true
    reportPHPWarnings: false
    report404: false
```

- `dsn` - If it is possible for sites with high traffic use UDP protocol.
- `reportPHPErrors` - If true, it sends a notification when there is a exception.
- `reportPHPWarnings` - If true, it sends a notification when there is a warning.
- `report404` - If true, it sends a notification when a user lands on a page 404. It should be used only for the duration of the study, the risk is that web crawlers will produce a lot of notifications.

### (Optional) Enable the helper in `config/settings.yml` (application level)

[](#optional-enable-the-helper-in-configsettingsyml-application-level)

```
.settings:
  standard_helpers: [default, Sentry, ...]
```

### (Optional) Configure the symfony logger in `config/factories.yml` (project and/or application level)

[](#optional-configure-the-symfony-logger-in-configfactoriesyml-project-andor-application-level)

```
prod:
  logger:
    param:
      loggers:
        amg_sentry_logger:
          class: amgSentryLogger
          param:
            level: warning
```

Additional docs about logging:

- [The factories.yml Configuration File (official doc)](http://symfony.com/legacy/doc/reference/1_4/en/05-Factories)
- [Enable logging in the production environment](http://symfony-blog.driebit.nl/2010/11/enable-logging-in-the-production-environment/)

### Clear the cache

[](#clear-the-cache)

```
$ symfony cc

```

Usage
-----

[](#usage)

### amgSentry

[](#amgsentry)

```
// send a message with no description and information level (by default)
amgSentry::sendMessage('Message title');

// send a debug message
amgSentry::sendMessage('Debug message title', 'Debug message description', amgSentry::DEBUG);

// send a warning message
amgSentry::sendMessage('Warning message title', 'Warning message description', amgSentry::WARNING);

// send an error message
amgSentry::sendMessage('Error message title', 'Error message description', amgSentry::ERROR);

// send an exception
amgSentry::sendException(new Exception('Exception message'), 'Exception description');

// set logger
amgSentry::setLogger('new-logger');

// reset logger
amgSentry::resetLogger();
```

### SentryHelper

[](#sentryhelper)

```
// send a message with no description and information level (by default)
sentry_send_message('Message title');

// send a debug message
sentry_send_message('Debug message title', 'Debug message description', amgSentry::DEBUG);

// send a warning message
sentry_send_message('Warning message title', 'Warning message description', amgSentry::WARNING);

// send an error message
sentry_send_message('Error message title', 'Error message description', amgSentry::ERROR);

// send an exception
sentry_send_exception(new Exception('Exception message'), 'Exception description');

// set logger
sentry_set_logger('new-logger');

// reset logger
sentry_reset_logger();
```

### sfLogger

[](#sflogger)

```
// log a debug message
sfContext::getInstance()->getLogger()->debug('Debug message');

// log an error message
sfContext::getInstance()->getLogger()->err('Error message');
```

Contributors
------------

[](#contributors)

- Nicolas Dubois
- Jean Roussel
- Arkadiusz Tułodziecki

### vendor/raven-php

[](#vendorraven-php)

The Sentry PHP client is maintained by the Sentry Team.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity66

Established project with proven stability

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

Total

3

Last Release

1814d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/76c703c3de96776eafc564cd80d9c50cbb5487a179984c2c90558233d38cda33?d=identicon)[doublejames-ah](/maintainers/doublejames-ah)

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

---

Top Contributors

[![akhumphrey](https://avatars.githubusercontent.com/u/69626?v=4)](https://github.com/akhumphrey "akhumphrey (14 commits)")[![ldath](https://avatars.githubusercontent.com/u/64095?v=4)](https://github.com/ldath "ldath (11 commits)")[![wo0dyn](https://avatars.githubusercontent.com/u/251655?v=4)](https://github.com/wo0dyn "wo0dyn (7 commits)")[![jroussel](https://avatars.githubusercontent.com/u/1225044?v=4)](https://github.com/jroussel "jroussel (1 commits)")

---

Tags

symfonysentrylogger

### Embed Badge

![Health badge](/badges/james-and-james-fulfilment-amg-sentry-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/james-and-james-fulfilment-amg-sentry-plugin/health.svg)](https://phpackages.com/packages/james-and-james-fulfilment-amg-sentry-plugin)
```

###  Alternatives

[sentry/sentry-symfony

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

73761.4M66](/packages/sentry-sentry-symfony)[justbetter/magento2-sentry

Magento 2 Logger for Sentry

1851.5M3](/packages/justbetter-magento2-sentry)

PHPackages © 2026

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