yatshub / yii2-google-cloud-error-reporting
Google cloud error reporting real-time exception monitoring and alerting for Yii2
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- google/cloud-error-reporting: ^0.18.4
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2025-02-19 00:53:41 UTC
README
Google Cloud Error Reporting for Yii2
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yatshub/yii2-google-cloud-error-reporting "*"
or add
"yatshub/yii2-google-cloud-error-reporting": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply generate a service account and configure your target as the following:
'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ ... 'googleCloudErrorReporting' => [ 'class' => 'yatshub\GoogleErrorReporting\ErrorReporting', 'levels' => ['error', 'warning'], 'except' => ['yii\web\HttpException:404'], 'projectId' => 'project-id', 'loggerInstance' => 'instance-log', 'clientSecretPath' => 'path/to/your/service/account/credentials.json', 'version' => 'dev or prod', 'service' => 'application name or any name for easy project tracking', ], ... ], ],