Skip to content

Commit b64c8ad

Browse files
authored
refactor: Upgrade @sentry/node and @sentry/vue to 9.42.1 (#17753)
1 parent f41a738 commit b64c8ad

File tree

7 files changed

+439
-494
lines changed

7 files changed

+439
-494
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
],
8585
"overrides": {
8686
"@azure/identity": "^4.3.0",
87+
"@n8n/typeorm>@sentry/node": "catalog:",
8788
"@types/node": "^20.17.50",
8889
"chokidar": "^4.0.1",
8990
"esbuild": "^0.24.0",

packages/@n8n/task-runner/src/__tests__/task-runner-sentry.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ErrorEvent } from '@sentry/types';
1+
import type { ErrorEvent } from '@sentry/core';
22
import { mock } from 'jest-mock-extended';
33
import type { ErrorReporter } from 'n8n-core';
44

packages/@n8n/task-runner/src/task-runner-sentry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Service } from '@n8n/di';
2-
import type { ErrorEvent, Exception } from '@sentry/types';
2+
import type { ErrorEvent, Exception } from '@sentry/core';
33
import { ErrorReporter } from 'n8n-core';
44

55
import { SentryConfig } from './config/sentry-config';

packages/core/src/errors/__tests__/error-reporter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Logger } from '@n8n/backend-common';
22
import { QueryFailedError } from '@n8n/typeorm';
3-
import type { ErrorEvent } from '@sentry/types';
3+
import type { ErrorEvent } from '@sentry/core';
44
import { AxiosError } from 'axios';
55
import { mock } from 'jest-mock-extended';
66
import { ApplicationError, BaseError } from 'n8n-workflow';

packages/core/src/errors/error-reporter.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { inTest, Logger } from '@n8n/backend-common';
22
import type { InstanceType } from '@n8n/constants';
33
import { Service } from '@n8n/di';
44
import type { ReportingOptions } from '@n8n/errors';
5+
import type { ErrorEvent, EventHint } from '@sentry/core';
56
import type { NodeOptions } from '@sentry/node';
6-
import type { ErrorEvent, EventHint } from '@sentry/types';
77
import { AxiosError } from 'axios';
88
import { ApplicationError, ExecutionCancelledError, BaseError } from 'n8n-workflow';
99
import { createHash } from 'node:crypto';
@@ -104,7 +104,7 @@ export class ErrorReporter {
104104
// eslint-disable-next-line @typescript-eslint/unbound-method
105105
this.report = this.defaultReport;
106106
} else {
107-
setTimeout(checkForExpiration, ONE_DAY_IN_MS);
107+
this.expirationTimer = setTimeout(checkForExpiration, ONE_DAY_IN_MS);
108108
}
109109
};
110110
checkForExpiration();
@@ -130,7 +130,7 @@ export class ErrorReporter {
130130
dsn,
131131
release,
132132
environment,
133-
enableTracing: false,
133+
tracesSampleRate: 0,
134134
serverName,
135135
beforeBreadcrumb: () => null,
136136
beforeSend: this.beforeSend.bind(this) as NodeOptions['beforeSend'],
@@ -144,7 +144,6 @@ export class ErrorReporter {
144144
headers: false,
145145
query_string: false,
146146
url: true,
147-
user: false,
148147
},
149148
}),
150149
],

pnpm-lock.yaml

Lines changed: 430 additions & 485 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ catalog:
1313
'@langchain/openai': 0.5.16
1414
'@langchain/anthropic': 0.3.23
1515
'@langchain/community': 0.3.47
16-
'@sentry/node': 8.52.1
16+
'@sentry/node': ^9.42.1
1717
'@types/basic-auth': ^1.1.3
1818
'@types/express': ^5.0.1
1919
'@types/jsonwebtoken': ^9.0.9
@@ -55,7 +55,7 @@ catalog:
5555

5656
catalogs:
5757
frontend:
58-
'@sentry/vue': ^8.33.1
58+
'@sentry/vue': ^9.42.1
5959
'@testing-library/jest-dom': ^6.6.3
6060
'@testing-library/user-event': ^14.6.1
6161
'@testing-library/vue': ^8.1.0

0 commit comments

Comments
 (0)