Skip to content

Commit

Permalink
OPE-10714 Use SENTRY_ENVIRONMENT instead of NODE_ENV to set Sentry En…
Browse files Browse the repository at this point in the history
…vironment

Using NODE_ENV was a mistake from the start.
  • Loading branch information
Farzad FARID committed Jun 23, 2020
1 parent 8e217c1 commit dea3ef8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ npm install --save chpr-logger
| `LOGGER_NAME` | yes | Sets the name of the logger. |
| `LOGGER_LEVEL` | yes | Set the minimum level of logs. |
| `SENTRY_DSN` | no | Sets the Sentry stream. ([bunyan-sentry-stream](https://www.npmjs.com/package/bunyan-sentry-stream)) |
| `SENTRY_ENVIRONMENT` | no | Sets the Sentry Environment. |
| `USE_BUNYAN_PRETTY_STREAM` | no | Outputs the logs on stdout with the pretty formatting from Bunyan. Must be set to `true` to be active. ([bunyan-prettystream](https://www.npmjs.com/package/bunyan-prettystream)) |
| `LOGGER_USE_SENSITIVE_DATA_STREAM` | no | Use the sensitive data stream to remove any possible sensitive data from the logs (enabled by default, `false` to use the `process.stdout` stream). |
| `LOGGER_SENSITIVE_DATA_PATTERN` | no | Pattern fragments to match sensitive keys (default is `(mdp|password|authorization|token|pwd|auth)`). |
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const defaultConfig = {
sentry: {
dsn: process.env.SENTRY_DSN,
release: undefined,
environment: process.env.NODE_ENV || 'development',
environment: process.env.SENTRY_ENVIRONMENT || 'development',
},
};

Expand Down

0 comments on commit dea3ef8

Please sign in to comment.