-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from utopia-php/fix-sentry-constructor
feat: update sentry constructor
- Loading branch information
Showing
4 changed files
with
208 additions
and
132 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 |
---|---|---|
|
@@ -54,7 +54,7 @@ $log->addExtra('urgent', false); | |
$log->addExtra('isExpected', true); | ||
|
||
// Sentry | ||
$adapter = new Sentry("[YOUR_SENTRY_KEY]"), "[YOUR_SENTRY_PROJECT_ID]"); | ||
$adapter = new Sentry("[YOUR_SENTRY_DSN]"); | ||
$logger = new Logger($adapter); | ||
$logger->addLog($log); | ||
|
||
|
@@ -93,11 +93,10 @@ Below is a list of supported adapters, and thier compatibly tested versions alon | |
To run all unit tests, use the following Docker command: | ||
|
||
```bash | ||
docker run --rm -e TEST_RAYGUN_KEY=KKKK -e TEST_APPSIGNAL_KEY=XXXX -e TEST_SENTRY_KEY=YYYY -e TEST_SENTRY_PROJECT_ID=ZZZZ -v $(pwd):$(pwd):rw -w $(pwd) php:8.0-cli-alpine sh -c "vendor/bin/phpunit --configuration phpunit.xml tests" | ||
docker run --rm -e TEST_RAYGUN_KEY=KKKK -e TEST_APPSIGNAL_KEY=XXXX -e TEST_SENTRY_DSN=XXXX -v $(pwd):$(pwd):rw -w $(pwd) php:8.0-cli-alpine sh -c "vendor/bin/phpunit --configuration phpunit.xml tests" | ||
``` | ||
|
||
> Make sure to replace `TEST_SENTRY_KEY` and `TEST_SENTRY_PROJECT_ID` environment variables value with actual keys from Sentry. If your Sentry DSN is `https://[email protected]/anything`, then `TEST_SENTRY_KEY=something` and `TEST_SENTRY_PROJECT_ID=anything`. | ||
Optionally `TEST_SENTRY_HOST` can be added to specify a self-hosted Sentry instance. | ||
> Make sure to replace `TEST_SENTRY_DSN` with actual keys from Sentry. | ||
> Make sure to replace `TEST_APPSIGNAL_KEY` with key found in Appsignal -> Project -> App Settings -> Push & deploy -> Push Key | ||
|
Oops, something went wrong.