Skip to content

T-3396 Keep sending the batch when an event can't provide caller data - #30

Merged
PetrHeinz merged 2 commits into
mainfrom
claude/t-3396-caller-data
Sep 25, 2026
Merged

PetrHeinz merged 2 commits into
mainfrom
claude/t-3396-caller-data

Conversation

@PetrHeinz

Copy link
Copy Markdown
Member

generateLogRuntime() asks every event for its caller data (hasCallerData() / getCallerData()) while the batch is being serialized. A plain logback LoggingEvent never throws there, but other ILoggingEvent implementations compute the data on the fly: the Quarkus logback bridge (io.quarkiverse.logback.runtime.LoggingEventWrapper) rebuilds StackTraceElements from the JBoss log record inside hasCallerData() and throws NullPointerException: Declaring class is null when the record carries no source class. The exception escapes batchToJson(), flushLogs() counts it as a failed request, and after maxRetries the 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 under runtime. 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

PetrHeinz and others added 2 commits September 23, 2026 16:28
…s from hasCallerData()

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@PetrHeinz
PetrHeinz marked this pull request as ready for review September 25, 2026 14:42
@PetrHeinz
PetrHeinz merged commit 65a270a into main Sep 25, 2026
5 checks passed
@PetrHeinz
PetrHeinz deleted the claude/t-3396-caller-data branch September 25, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant