mirror of https://github.com/TryGhost/Ghost.git
Prevented profiling from being enabled if tracing is not enabled
This commit is contained in:
parent
8c33a99c46
commit
e0a50fc9b3
|
@ -75,10 +75,11 @@ if (sentryConfig && !sentryConfig.disabled) {
|
||||||
sentryInitConfig.integrations.push(new Sentry.Integrations.Http({tracing: true}));
|
sentryInitConfig.integrations.push(new Sentry.Integrations.Http({tracing: true}));
|
||||||
sentryInitConfig.integrations.push(new Sentry.Integrations.Express());
|
sentryInitConfig.integrations.push(new Sentry.Integrations.Express());
|
||||||
sentryInitConfig.tracesSampleRate = parseFloat(sentryConfig.tracing.sampleRate) || 0.0;
|
sentryInitConfig.tracesSampleRate = parseFloat(sentryConfig.tracing.sampleRate) || 0.0;
|
||||||
}
|
// Enable profiling, if configured, only if tracing is also configured
|
||||||
if (sentryConfig.profiling?.enabled === true) {
|
if (sentryConfig.profiling?.enabled === true) {
|
||||||
sentryInitConfig.integrations.push(new ProfilingIntegration());
|
sentryInitConfig.integrations.push(new ProfilingIntegration());
|
||||||
sentryInitConfig.profilesSampleRate = parseFloat(sentryConfig.profiling.sampleRate) || 0.0;
|
sentryInitConfig.profilesSampleRate = parseFloat(sentryConfig.profiling.sampleRate) || 0.0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Sentry.init(sentryInitConfig);
|
Sentry.init(sentryInitConfig);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue