mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
chore(core): Upgrade backend @sentry packages to 8.42.0 (#12061)
This commit is contained in:
parent
43009b6aa8
commit
db09d0e77e
|
@ -35,7 +35,6 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@n8n/config": "workspace:*",
|
||||
"@sentry/integrations": "catalog:",
|
||||
"@sentry/node": "catalog:",
|
||||
"acorn": "8.14.0",
|
||||
"acorn-walk": "8.3.4",
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
import { RewriteFrames } from '@sentry/integrations';
|
||||
import { init, setTag, captureException, close } from '@sentry/node';
|
||||
import type { ErrorEvent, EventHint } from '@sentry/types';
|
||||
import {
|
||||
init,
|
||||
setTag,
|
||||
captureException,
|
||||
close,
|
||||
rewriteFramesIntegration,
|
||||
type EventHint,
|
||||
type ErrorEvent,
|
||||
} from '@sentry/node';
|
||||
import * as a from 'assert/strict';
|
||||
import { createHash } from 'crypto';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
|
@ -52,7 +58,7 @@ export class ErrorReporter {
|
|||
beforeSend: async (event, hint) => await this.beforeSend(event, hint),
|
||||
integrations: (integrations) => [
|
||||
...integrations.filter(({ name }) => ENABLED_INTEGRATIONS.includes(name)),
|
||||
new RewriteFrames({ root: process.cwd() }),
|
||||
rewriteFramesIntegration({ root: process.cwd() }),
|
||||
],
|
||||
});
|
||||
|
||||
|
|
|
@ -98,7 +98,6 @@
|
|||
"@n8n_io/license-sdk": "2.13.1",
|
||||
"@oclif/core": "4.0.7",
|
||||
"@rudderstack/rudder-sdk-node": "2.0.9",
|
||||
"@sentry/integrations": "catalog:",
|
||||
"@sentry/node": "catalog:",
|
||||
"aws4": "1.11.0",
|
||||
"axios": "catalog:",
|
||||
|
|
|
@ -7,7 +7,6 @@ import { InternalServerError } from '@/errors/response-errors/internal-server.er
|
|||
|
||||
const init = jest.fn();
|
||||
|
||||
jest.mock('@sentry/integrations');
|
||||
jest.mock('@sentry/node', () => ({
|
||||
init,
|
||||
setTag: jest.fn(),
|
||||
|
|
|
@ -94,11 +94,8 @@ export abstract class AbstractServer {
|
|||
const { app } = this;
|
||||
|
||||
// Augment errors sent to Sentry
|
||||
const {
|
||||
Handlers: { requestHandler, errorHandler },
|
||||
} = await import('@sentry/node');
|
||||
app.use(requestHandler());
|
||||
app.use(errorHandler());
|
||||
const { setupExpressErrorHandler } = await import('@sentry/node');
|
||||
setupExpressErrorHandler(app);
|
||||
}
|
||||
|
||||
private setupCommonMiddlewares() {
|
||||
|
|
|
@ -33,8 +33,7 @@ export const initErrorHandling = async () => {
|
|||
|
||||
const { init, captureException, setTag } = await import('@sentry/node');
|
||||
|
||||
const { RewriteFrames } = await import('@sentry/integrations');
|
||||
const { Integrations } = await import('@sentry/node');
|
||||
const { requestDataIntegration, rewriteFramesIntegration } = await import('@sentry/node');
|
||||
|
||||
const enabledIntegrations = [
|
||||
'InboundFilters',
|
||||
|
@ -54,8 +53,8 @@ export const initErrorHandling = async () => {
|
|||
beforeBreadcrumb: () => null,
|
||||
integrations: (integrations) => [
|
||||
...integrations.filter(({ name }) => enabledIntegrations.includes(name)),
|
||||
new RewriteFrames({ root: process.cwd() }),
|
||||
new Integrations.RequestData({
|
||||
rewriteFramesIntegration({ root: process.cwd() }),
|
||||
requestDataIntegration({
|
||||
include: {
|
||||
cookies: false,
|
||||
data: false,
|
||||
|
|
|
@ -48,7 +48,7 @@ export class MessageEventBusDestinationSentry
|
|||
environment,
|
||||
release: N8N_VERSION,
|
||||
transport: Sentry.makeNodeTransport,
|
||||
integrations: Sentry.defaultIntegrations,
|
||||
integrations: Sentry.getDefaultIntegrations({}),
|
||||
stackParser: Sentry.defaultStackParser,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -133,11 +133,8 @@ export class TaskRunnerServer {
|
|||
|
||||
// Augment errors sent to Sentry
|
||||
if (this.globalConfig.sentry.backendDsn) {
|
||||
const {
|
||||
Handlers: { requestHandler, errorHandler },
|
||||
} = await import('@sentry/node');
|
||||
app.use(requestHandler());
|
||||
app.use(errorHandler());
|
||||
const { setupExpressErrorHandler } = await import('@sentry/node');
|
||||
setupExpressErrorHandler(app);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
766
pnpm-lock.yaml
766
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -5,8 +5,7 @@ packages:
|
|||
- cypress
|
||||
|
||||
catalog:
|
||||
'@sentry/integrations': 7.87.0
|
||||
'@sentry/node': 7.87.0
|
||||
'@sentry/node': 8.42.0
|
||||
'@types/basic-auth': ^1.1.3
|
||||
'@types/express': ^4.17.21
|
||||
'@types/lodash': ^4.14.195
|
||||
|
|
Loading…
Reference in a new issue