fix(core): Fix Sentry error reporting on task runners (#12495)

This commit is contained in:
Iván Ovejero
2025-01-08 17:47:40 +01:00
committed by GitHub
parent dd36bb28bf
commit 88c0838dd7
7 changed files with 62 additions and 19 deletions

View File

@@ -61,10 +61,15 @@ export abstract class BaseCommand extends Command {
async init(): Promise<void> {
this.errorReporter = Container.get(ErrorReporter);
await this.errorReporter.init(
this.instanceSettings.instanceType,
this.globalConfig.sentry.backendDsn,
);
const { backendDsn, n8nVersion, environment, deploymentName } = this.globalConfig.sentry;
await this.errorReporter.init({
serverType: this.instanceSettings.instanceType,
dsn: backendDsn,
environment,
release: n8nVersion,
serverName: deploymentName,
});
initExpressionEvaluator();
process.once('SIGTERM', this.onTerminationSignal('SIGTERM'));