mirror of
https://github.com/strapi/strapi.git
synced 2025-11-06 21:29:24 +00:00
Merge pull request #4452 from clorichel/patch-1
Add Strapi environment to Sentry error
This commit is contained in:
commit
5edde3f1ec
@ -28,7 +28,9 @@ module.exports = strapi => {
|
|||||||
|
|
||||||
## Handle errors
|
## Handle errors
|
||||||
|
|
||||||
Here is the [Node.js client documentation](https://docs.sentry.io/platforms/node/)
|
Here is the [Node.js client documentation](https://docs.sentry.io/platforms/node/).
|
||||||
|
|
||||||
|
Install it with `yarn add @sentry/node` or `npm install @sentry/node --save`.
|
||||||
|
|
||||||
- Now add the logic that will catch errors.
|
- Now add the logic that will catch errors.
|
||||||
|
|
||||||
@ -36,7 +38,10 @@ Here is the [Node.js client documentation](https://docs.sentry.io/platforms/node
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
const Sentry = require('@sentry/node');
|
const Sentry = require('@sentry/node');
|
||||||
Sentry.init({ dsn: 'https://<key>@sentry.io/<project>' });
|
Sentry.init({
|
||||||
|
dsn: 'https://<key>@sentry.io/<project>',
|
||||||
|
environment: strapi.config.environment,
|
||||||
|
});
|
||||||
|
|
||||||
module.exports = strapi => {
|
module.exports = strapi => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user