mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
chore: Add server_type
tag to Sentry errors (no-changelog) (#11277)
This commit is contained in:
parent
785b47feb3
commit
e7a4b0da01
|
@ -3,6 +3,7 @@ import { GlobalConfig } from '@n8n/config';
|
|||
import { QueryFailedError } from '@n8n/typeorm';
|
||||
import { AxiosError } from 'axios';
|
||||
import { createHash } from 'crypto';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
import { ErrorReporterProxy, ApplicationError } from 'n8n-workflow';
|
||||
import Container from 'typedi';
|
||||
|
||||
|
@ -30,7 +31,7 @@ export const initErrorHandling = async () => {
|
|||
DEPLOYMENT_NAME: serverName,
|
||||
} = process.env;
|
||||
|
||||
const { init, captureException } = await import('@sentry/node');
|
||||
const { init, captureException, setTag } = await import('@sentry/node');
|
||||
|
||||
const { RewriteFrames } = await import('@sentry/integrations');
|
||||
const { Integrations } = await import('@sentry/node');
|
||||
|
@ -95,6 +96,8 @@ export const initErrorHandling = async () => {
|
|||
},
|
||||
});
|
||||
|
||||
setTag('server_type', Container.get(InstanceSettings).instanceType);
|
||||
|
||||
ErrorReporterProxy.init({
|
||||
report: (error, options) => captureException(error, options),
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue