T-3396 Keep sending the batch when an event can't provide caller data - #30
Merged
Merged
Conversation
…s from hasCallerData() Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
generateLogRuntime()asks every event for its caller data (hasCallerData()/getCallerData()) while the batch is being serialized. A plain logbackLoggingEventnever throws there, but otherILoggingEventimplementations compute the data on the fly: the Quarkus logback bridge (io.quarkiverse.logback.runtime.LoggingEventWrapper) rebuildsStackTraceElements from the JBoss log record insidehasCallerData()and throwsNullPointerException: Declaring class is nullwhen the record carries no source class. The exception escapesbatchToJson(),flushLogs()counts it as a failed request, and aftermaxRetriesthe whole batch is dropped, so an app on Quarkus can end up sending nothing at all.Caller data is optional in the payload (it is already left out whenever
hasCallerData()is false), so the lookup now catches the failure and sends the line with just the thread name underruntime. The rest of the line and the rest of the batch are unaffected.The first commit is the failing test on its own and is expected to fail CI; the second commit makes it pass.
🤖 Generated with Claude Code