Added Node environment to Sentry metadata

no issue

- this allows us to differentiate between development and production
This commit is contained in:
Daniel Lockyer 2020-04-27 19:59:09 +01:00
parent ce48d36a49
commit 9a962368dc

View File

@ -8,9 +8,11 @@ const expressNoop = function (req, res, next) {
if (sentryConfig && !sentryConfig.disabled) { if (sentryConfig && !sentryConfig.disabled) {
const Sentry = require('@sentry/node'); const Sentry = require('@sentry/node');
const version = require('../server/lib/ghost-version').full; const version = require('../server/lib/ghost-version').full;
const environment = config.get('env');
Sentry.init({ Sentry.init({
dsn: sentryConfig.dsn, dsn: sentryConfig.dsn,
release: 'ghost@' + version release: 'ghost@' + version,
environment: environment
}); });
module.exports = { module.exports = {