Repository navigation
Conversation
… logger category - Log a dd-trace preload failure as a single JSON line when LOG_JSON=true, then rethrow. - Configure log4js with the JSON appender at load time when LOG_JSON=true, so logs emitted before log4js(config) are JSON instead of plain text. - Log errors thrown during orka start-up and rethrow them. - Move loggers taken before configuration from 'initializing.<name>' to '<name>'. Co-Authored-By: Claude Opus 5.5 <[email protected]>
MixalisV
requested review from
echetzakis,
klesgidis,
kzacharakis,
nikosd23 and
stavros-wb
as code owners
October 16, 2026 08:37
…ted errors in JSON logs
- getLogger(name) uses the plain name from the start instead of 'initializing.<name>', so
errors logged before log4js(config) (e.g. an app's uncaughtException handler) are filed
under the app's category. Configuring log4js still resets the early 'trace' level.
- json-appender takes the stack trace from an Error passed after the message or inside a
context object (e.g. { reason: error }) and no longer prefixes such messages with
"undefined - ".
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ializing category - With LOG_JSON=true, exit with code 1 after writing the preload failure instead of rethrowing, so Node doesn't print the stack again as plain text lines that each become a separate entry. Write the line synchronously so it isn't lost on exit. - Log "Initializing riviere..." under orka.riviere and drop the now unused `initializing: 'debug'` log category default. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Can you give an example of what is happening now? A link to the logs maybe |
Contributor
Author
As you can see here, The v0.317.0 start-up crash was logged as [ERROR] initializing.app - Uncaught Exception…, but Datadog marked it info and filed it under initializing.app. |
This branch has not been deployed
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.

Jira: DS-3502 · Incident: QA-8308 · Replaces the maestro workaround Workable/maestro#1206
Problem
Errors during orka start-up reach Datadog as
infounderinitializing.<name>:log4js(config), logs are plain text even withLOG_JSON=true, so Datadog merges them into the preceding start-up output, and the merged entry gets statusinfo.getLogger(name)keeps the temporaryinitializing.<name>category for the whole process.json-appenderonly finds the error in the first argument, sologger.error('msg', { reason: err })logs"undefined - msg"and no stack trace.Changes
LOG_JSON=true, write one JSON error line and exit with code 1. dd-trace still loads first.LOG_JSON=true, logs are JSON from the start. Loggers use their plain name (app,orka).Errorpassed later or inside a context object.orka.riviere, and the unusedinitializinglog category default is removed.Behaviour changes
LOG_JSON, error logs whose first argument is a string changemessagefrom"undefined - msg"to"msg"and now includestack_trace.orka()followlog.levelinstead of theinitializingcategory's level. This only matters ifLOG_LEVELis abovedebug.Tests
early-logging.test.ts:LOG_JSONuncaughtExceptionhandler like maestro'sjson-appendercases for the error-finding rules.Follow-up
logErrorworkaround.🤖 Generated with Claude Code