2017 © Pedro Peláez
 

silverstripe-vendormodule sentry

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

image

phptek/sentry

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  • Thursday, May 17, 2018
  • by phptek
  • Repository
  • 1 Watchers
  • 6 Stars
  • 4,845 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 3 Open issues
  • 15 Versions
  • 48 % Grown

The README.md

Sentry.io integration for SilverStripe

CI Scrutinizer Code Quality License, (*1)

Sentry and Glitchtip are error and exception aggregation services. Systems like these take your application's errors, aggregate them alongside configurable context and store them for triage and analysis., (*2)

Imagine this: You see errors and exceptions before your clients do. The error > report > debug > patch > deploy cycle is therefore the most efficient it can possibly be., (*3)

This module binds sentry.io, app.glitchtip.com and on-prem hosted Sentry/Glitchtip installations to the Monlog error logger in Silverstripe. If you've used systems like RayGun, Rollbar, AirBrake and BugSnag before, you'll know roughly what to expect., (*4)

Requirements

See composer.json, (*5)

Setup:

composer require phptek/sentry

Notes:

  • Version 5.x is aimed at Silverstripe 5.
  • Versions 2.x, 3.x and 4.x should work with the same Silverstripe v4 setups. v3+ simply use newer versions of the Sentry PHP SDK and have additional bugfixes and features.
  • Version 3.x SentryClientAdaptor has been renamed to SentryAdaptor and SentryLogWriter was renamed to SentryLogger, so your existing configuration(s) may need to be updated accordingly.

Config

You can set your DSN as a first-class environment variable in .env or your CI config:, (*6)

SENTRY_DSN="http://deacdf9dfedb24ccdce1b90017b39dca:deacdf9dfedb24ccdce1b90017b39dca@sentry.mydomain.nz/44"

You can also set it in your project's YML config:, (*7)

---
Name: my-project-config-sentry
After:
  - 'sentry-config'
---

# Send errors reported for all environment modes: `dev`, `test` and `live` envs

PhpTek\Sentry\Adaptor\SentryAdaptor:
  opts:
    # Example DSN only. Obviously you'll need to setup your own Sentry "Project"
    dsn: http://deacdf9dfedb24ccdce1b90017b39dca:deacdf9dfedb24ccdce1b90017b39dca@sentry.mydomain.nz/44

Conditional Config

---
Name: my-project-config-sentry
After:
  - 'sentry-config'
---

# Send errors reported just in `test` and `live`, but not `dev` envs

---
Only:
  environment: test
---
PhpTek\Sentry\Adaptor\SentryAdaptor:
  opts:
    # Example DSN only. Obviously you'll need to setup your own Sentry "Project"
    dsn: http://deacdf9dfedb24ccdce1b90017b39dca:deacdf9dfedb24ccdce1b90017b39dca@sentry.mydomain.nz/44
---
Except:
  environment: test
---
PhpTek\Sentry\Adaptor\SentryAdaptor:
  opts:
    # Example DSN only. Obviously you'll need to setup your own Sentry "Project"
    dsn: http://deacdf9dfedb24ccdce1b90017b39dca:deacdf9dfedb24ccdce1b90017b39dca@sentry.mydomain.nz/44
---
Only:
  environment: dev
---
PhpTek\Sentry\Adaptor\SentryAdaptor:
  opts:
    dsn: null
---

Please review the usage docs for further configuration and customisation options., (*8)

Notes:, (*9)

  • Silence Injector errors where test and live envs have http_proxy set but dev environments don't: Provide a value of null, which applies to all YML config where one env has a setting and another doesn't. For example:
...
    ---
    Only:
      environment: dev
    ---
    PhpTek\Sentry\Adaptor\SentryAdaptor:
      opts:
        dsn: null
        http_proxy: null
    ---
...
  • As per the examples above, ensure your project's config is set to come after the module's own config, thus:, (*10)

    After:, (*11)

    • 'sentry-config'

SilverStripe Framework v3

YML Config:, (*12)

phptek\Sentry\Adaptor\SentryClientAdaptor:
  opts:
    # Example DSN only. Obviously you'll need to setup your own Sentry "Project"
    dsn: http://deacdf9dfedb24ccdce1b90017b39dca:deacdf9dfedb24ccdce1b90017b39dca@sentry.mydomain.nz/44

mysite/_config.php:, (*13)

SS_Log::add_writer(\phptek\Sentry\SentryLogWriter::factory(), SS_Log::ERR, '<=');

Usage

Sentry is normally setup once in your project's .env, YML config or even _config.php file. See the above examples and the usage docs for details and options., (*14)

Support Me

If you like what you see, support me! I accept Bitcoin:, (*15)

Bitcoin
3KxmqFeVWoigjvXZoLGnoNzvEwnDq3dZ8Q

 , (*16)

 , (*17)

The Versions

17/05 2018

dev-master

9999999-dev

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD BSD-3-Clause

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

09/04 2018

2.0.0-alpha2

2.0.0.0-alpha2

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

30/01 2018

2.0.0-alpha1

2.0.0.0-alpha1

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

24/01 2018

dev-ss4

dev-ss4

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD BSD-3-Clause

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

24/01 2018

dev-issue/4

dev-issue/4

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD BSD-3-Clause

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

08/08 2017

1.1.2

1.1.2.0

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

02/04 2017

1.1.1

1.1.1.0

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

02/04 2017

1.1.0

1.1.0.0

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

05/03 2017

1.0.0

1.0.0.0

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

05/03 2017

0.7

0.7.0.0

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

05/03 2017

0.6

0.6.0.0

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

02/03 2017

0.5.1

0.5.1.0

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

28/02 2017

0.5

0.5.0.0

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD

The Requires

 

The Development Requires

log logging exception silverstripe raven sentry error logs

27/02 2017

0.4

0.4.0.0

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD

The Requires

 

log logging exception silverstripe raven sentry error logs

26/02 2017

dev-add-tests

dev-add-tests

Sentry.io integration for SilverStripe. Binds Sentry.io to SilverStripe's error & exception handling subsystem.

  Sources   Download

BSD

The Requires

 

log logging exception silverstripe raven sentry error logs