-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEW: Modified project to use github actions/workflows
- Loading branch information
Showing
4 changed files
with
41 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
ci: | ||
name: CI | ||
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 | ||
with: | ||
phpcoverage_force_off: true | ||
phplinting: false | ||
doclinting: false | ||
phpunit: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,18 @@ | ||
# Sentry.io integration for SilverStripe | ||
|
||
[![Build Status](https://api.travis-ci.org/phptek/silverstripe-sentry.svg?branch=master)](https://travis-ci.org/phptek/silverstripe-sentry) | ||
[![CI](https://github.com/phptek/silverstripe-sentry/actions/workflows/ci.yml/badge.svg)](https://github.com/phptek/silverstripe-sentry/actions/workflows/ci.yml) | ||
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/phptek/silverstripe-sentry/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phptek/silverstripe-sentry/?branch=master) | ||
[![License](https://poser.pugx.org/phptek/sentry/license.svg)](https://github.com/phptek/silverstripe-sentry/blob/master/LICENSE.md) | ||
|
||
[Sentry](https://sentry.io) is an error and exception aggregation service. It takes your application's errors, aggregates them alongside configurable context and stores them for later analysis and debugging. | ||
[Sentry](https://sentry.io) and [Glitchtip](https://glitchtip.com) 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. | ||
|
||
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. | ||
|
||
This module binds Sentry.io and hosted Sentry installations, to the Monlog error logger in SilverStripe. If you've used systems like | ||
[RayGun](https://raygun.com), [Rollbar](https://rollbar.com), [AirBrake](https://airbrake.io/) and [BugSnag](https://www.bugsnag.com/) before, you'll know roughly what to expect. | ||
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](https://raygun.com), [Rollbar](https://rollbar.com), [AirBrake](https://airbrake.io/) and [BugSnag](https://www.bugsnag.com/) before, you'll know roughly what to expect. | ||
|
||
## Requirements | ||
|
||
See `composer.json`. | ||
See `composer.json` | ||
|
||
## Setup: | ||
|
||
|
@@ -27,35 +26,35 @@ This module binds Sentry.io and hosted Sentry installations, to the Monlog error | |
|
||
## Config | ||
|
||
You can set your DSN as a first-class environment variable or via your project's `.env` file: | ||
You can set your DSN as a first-class environment variable in `.env` or your CI config: | ||
|
||
SENTRY_DSN="http://deacdf9dfedb24ccdce1b90017b39dca:[email protected]/44" | ||
|
||
Or you can set it in YML config, where you gain a little more flexibility and control: | ||
|
||
The following will get you errors reported in all environment modes: `dev`, `test` and `live`: | ||
You can also set it in your project's YML config: | ||
|
||
--- | ||
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:[email protected]/44 | ||
|
||
### Conditional Config | ||
|
||
The following will get you errors reported just in `test` and `live` but not `dev`: | ||
|
||
--- | ||
Name: my-project-config-sentry | ||
After: | ||
- 'sentry-config' | ||
--- | ||
|
||
# Send errors reported just in `test` and `live`, but not `dev` envs | ||
|
||
--- | ||
Only: | ||
environment: test | ||
|
@@ -85,7 +84,7 @@ Please review the [usage docs](docs/en/usage.md) for further configuration and c | |
|
||
Notes: | ||
|
||
* You can silence errors from `Injector` where "test" and "live" envs have `http_proxy` set, but "dev" environments don't. Just set `null` as the value. This applies to all YML config where some envs have a setting and others don't. For example: | ||
* 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: | ||
|
||
``` | ||
... | ||
|
@@ -101,7 +100,7 @@ Notes: | |
... | ||
``` | ||
|
||
* As per the examples above, ensure your project's Sentry config is set to come *after* the module's own config, thus: | ||
* As per the examples above, ensure your project's config is set to come *after* the module's own config, thus: | ||
|
||
After: | ||
- 'sentry-config' | ||
|
@@ -121,7 +120,7 @@ mysite/_config.php: | |
|
||
## Usage | ||
|
||
Sentry is normally setup once in your project's YML config or `_config.php` file. See the above examples and the [usage docs](docs/en/usage.md) for details and options. | ||
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](docs/en/usage.md) for details and options. | ||
|
||
## Support Me | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true"> | ||
<testsuites> | ||
<testsuite name="Default"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
<testsuite name="sentry"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |