-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into N8N-5191-pinia-migration-part2
* master: fix(editor): Showing string numbers and null properly in JSON view (#4513) fix(editor): Switch `CodeNodeEditor` linter parser to `esprima-next` (#4524) fix(API): Do not use names for typeorm connections (#4532) refactor(editor): Encapsulate canvas actions (#4416) fix: Database config should resolve entities and migrations folder relative to it's path (no-changelog) (#4527) feat(API): Set up error tracking using Sentry (#4394) fix(editor): Curb arg linting for `$input.first()` and `$input.last()` (#4526) fix(HTTP Request Node): use the data in "Put Output in Field" field (#4487) refactor: consolidate database configs (#4522) # Conflicts: # packages/editor-ui/src/views/NodeView.vue
- Loading branch information
Showing
43 changed files
with
2,385 additions
and
1,759 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,6 +136,12 @@ export const schema = { | |
}, | ||
}, | ||
sqlite: { | ||
database: { | ||
doc: 'SQLite Database file name', | ||
format: String, | ||
default: 'database.sqlite', | ||
env: 'DB_SQLITE_DATABASE', | ||
}, | ||
executeVacuumOnStartup: { | ||
doc: 'Runs VACUUM operation on startup to rebuild the database. Reduces filesize and optimizes indexes. WARNING: This is a long running blocking operation. Will increase start-up time.', | ||
format: Boolean, | ||
|
@@ -942,6 +948,15 @@ export const schema = { | |
env: 'N8N_DIAGNOSTICS_POSTHOG_DISABLE_RECORDING', | ||
}, | ||
}, | ||
sentry: { | ||
dsn: { | ||
doc: 'Data source name for error tracking on Sentry', | ||
format: String, | ||
default: | ||
'https://[email protected]/4504016528408576', | ||
env: 'N8N_SENTRY_DSN', | ||
}, | ||
}, | ||
frontend: { | ||
doc: 'Diagnostics config for frontend.', | ||
format: String, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import * as Sentry from '@sentry/node'; | ||
import { RewriteFrames } from '@sentry/integrations'; | ||
import type { Application } from 'express'; | ||
import config from '../config'; | ||
import { ErrorReporterProxy } from 'n8n-workflow'; | ||
|
||
let initialized = false; | ||
|
||
export const initErrorHandling = (app?: Application) => { | ||
if (initialized) return; | ||
|
||
if (!config.getEnv('diagnostics.enabled')) { | ||
initialized = true; | ||
return; | ||
} | ||
|
||
const dsn = config.getEnv('diagnostics.config.sentry.dsn'); | ||
const { N8N_VERSION: release, ENVIRONMENT: environment } = process.env; | ||
|
||
Sentry.init({ | ||
dsn, | ||
release, | ||
environment, | ||
integrations: (integrations) => { | ||
integrations.push(new RewriteFrames({ root: process.cwd() })); | ||
return integrations; | ||
}, | ||
}); | ||
|
||
if (app) { | ||
const { requestHandler, errorHandler } = Sentry.Handlers; | ||
app.use(requestHandler()); | ||
app.use(errorHandler()); | ||
} | ||
|
||
ErrorReporterProxy.init({ | ||
report: (error, options) => Sentry.captureException(error, options), | ||
}); | ||
|
||
initialized = true; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.