Skip to content

Commit

Permalink
Merge pull request #29 from utopia-php/fix-sentry-constructor
Browse files Browse the repository at this point in the history
feat: update sentry constructor
  • Loading branch information
christyjacob4 authored Jul 28, 2023
2 parents 81aba34 + 3e68d86 commit 69bd7a2
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 132 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 69bd7a2

Please sign in to comment.