Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/websupport-sk/yii-sentry
Sentry extension for Yii 1
https://github.com/websupport-sk/yii-sentry
sentry yii yii-extension
Last synced: 3 months ago
JSON representation
Sentry extension for Yii 1
- Host: GitHub
- URL: https://github.com/websupport-sk/yii-sentry
- Owner: websupport-sk
- License: bsd-3-clause
- Created: 2019-07-30T11:16:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T10:34:10.000Z (almost 2 years ago)
- Last Synced: 2024-10-07T17:02:46.006Z (4 months ago)
- Topics: sentry, yii, yii-extension
- Language: PHP
- Size: 43.9 KB
- Stars: 1
- Watchers: 10
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Yii Sentry extension
Logging Extension for Yii framework for communication with Sentry logging API## Installation
**Yii Sentry** is composer library so you can install the latest version with:
```shell
composer require websupport/yii-sentry
```## Configuration
Add following to your application's config:
### PHP error reporting
```php
'components' => [
'log' => [
'class' => \CLogRouter::class,
'routes' => [
// your other log routers
array(
'class' => \Websupport\YiiSentry\LogRoute::class,
'levels' => E_ALL,
'enabled' => !YII_DEBUG,
],
],
],
'sentry' => [
'class' => \Websupport\YiiSentry\Client::class,
'dsn' => '', // Your's DSN from Sentry
],
)
```### JS error reporting
```php
'preload' => ['sentry'],
'components' => [
'sentry' => [
'class' => \Websupport\YiiSentry\Client::class,
'jsDsn' => '', // Your's DSN from Sentry
],
]
```#### Sending user context to JS
`\Websupport\YiiSentry\Client` component has public method: `setJsUserContext($context)` which will send `$context` to Raven JS instance.
You can call this method multiple times from any part of the system. Recommended way however is to use it in `CWebUser` class right after init.