feat(logger): report errors to Sentry when SENTRY_DSN is set - #49
Draft
juliusknorr wants to merge 3 commits into
Draft
juliusknorr wants to merge 3 commits into
juliusknorr wants to merge 3 commits into
Conversation
Refs Euro-Office/DocumentServer#392 Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Julius Knorr <jus@bitgrid.net>
25 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of Euro-Office/DocumentServer#392 (stage 2).
Common/sources/reporters/sentry.js: log4js appender for levelerror+,@sentry/node10logger.jsadds the appender whenSENTRY_DSNis set (in code rather than via entrypoints, sopkgbundles it); disabled otherwiseCommon/sources/reporters/index.jsis the only entry point:init(service)initializes all backends,appenders()returns their log4js appenders. Adding a backend = one file plus one line thereservicetag (docservice, converter, spellchecker, adminpanel)SENTRY_DSN,SENTRY_ENVIRONMENT,SENTRY_RELEASE(defaultdocumentserver@<version>)Errorobjects throughtenantanddocIdfrom the log context (placeholders skipped);userIdand Nextcloud ids follow in stage 3logger.shutdown. Unhandled rejections already reach the existinguncaughtExceptionhandlers (Node's defaultthrowmode), so the SDK's own crash handlers are disabled. AdminPanel gets the same handler.token=/doc=query params,Authorizationheaders and bearer tokens;sendDefaultPii: falseTested: unit test in
tests/unit/sentryReporter.tests.js, plus a smoke run of the real SDK against a local sink (scrubbing, grouping and flush before exit).AI-assisted, see Assisted-by trailer.