Repository navigation
test(log4j2): [Sample Tests 30] Move the log4j2 sample's system test into sentry-log4j2 - #6322
Draft
runningcode wants to merge 1 commit into
Draft
runningcode wants to merge 1 commit into
runningcode wants to merge 1 commit into
Conversation
This was referenced Oct 20, 2026
Merged
Merged
Merged
Merged
Draft
📲 Install BuildsAndroid
|
This was referenced Oct 20, 2026
Open
runningcode
force-pushed
the
no/spring-integration-test
branch
from
October 21, 2026 09:19
e40433c to
c037b50
Compare
runningcode
force-pushed
the
no/log4j2-integration-test
branch
3 times, most recently
from
October 22, 2026 12:40
a75e37b to
b0314cc
Compare
runningcode
force-pushed
the
no/spring-integration-test
branch
2 times, most recently
from
October 22, 2026 13:31
937d099 to
ab3ec67
Compare
runningcode
force-pushed
the
no/log4j2-integration-test
branch
2 times, most recently
from
October 22, 2026 14:02
51bfdc5 to
86d0dfa
Compare
runningcode
force-pushed
the
no/spring-integration-test
branch
from
October 22, 2026 14:02
ab3ec67 to
5cafbe2
Compare
runningcode
force-pushed
the
no/log4j2-integration-test
branch
2 times, most recently
from
October 23, 2026 08:24
6e53b02 to
f3b9555
Compare
runningcode
force-pushed
the
no/spring-integration-test
branch
2 times, most recently
from
October 23, 2026 08:58
b350b2b to
5c495a9
Compare
runningcode
force-pushed
the
no/log4j2-integration-test
branch
2 times, most recently
from
October 23, 2026 09:35
0a91c02 to
a03968b
Compare
runningcode
force-pushed
the
no/spring-integration-test
branch
2 times, most recently
from
October 23, 2026 11:51
8cc9779 to
162bf35
Compare
runningcode
force-pushed
the
no/log4j2-integration-test
branch
from
October 23, 2026 11:51
a03968b to
19bf568
Compare
runningcode
force-pushed
the
no/spring-integration-test
branch
from
October 23, 2026 12:48
162bf35 to
c51a4e8
Compare
runningcode
force-pushed
the
no/log4j2-integration-test
branch
from
October 23, 2026 12:48
19bf568 to
6947081
Compare
runningcode
force-pushed
the
no/spring-integration-test
branch
from
October 23, 2026 13:02
c51a4e8 to
892c858
Compare
runningcode
force-pushed
the
no/log4j2-integration-test
branch
from
October 23, 2026 13:02
6947081 to
81a04da
Compare
runningcode
force-pushed
the
no/spring-integration-test
branch
from
October 23, 2026 13:53
892c858 to
ec269f4
Compare
runningcode
force-pushed
the
no/log4j2-integration-test
branch
from
October 23, 2026 13:53
81a04da to
3aa400c
Compare
Adds SentryAppenderIntegrationTest, which configures the Sentry appender from XML in a logger context of its own and checks what reaches MockSentryServer: the warning event with its context tag and flag, the error with its exception and breadcrumbs, and the logs with their attributes. Logs are enabled through external configuration, as the sample's sentry.properties does, because the appender has no attribute for them. The sample has no system tests left, so it comes off the system-test runner and the backend workflow, and drops the Kotlin plugin it only needed for the test. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
runningcode
force-pushed
the
no/spring-integration-test
branch
from
October 23, 2026 15:10
ec269f4 to
d859296
Compare
runningcode
force-pushed
the
no/log4j2-integration-test
branch
from
October 23, 2026 15:10
3aa400c to
74217bf
Compare
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.
PR Stack (Sample Tests)
main)📜 Description
Moves
sentry-samples-log4j2's system test intosentry-log4j2asSentryAppenderIntegrationTest, the log4j2 version of the logback test in #6268. The sample's test ran its JAR against the Python mock server. The new test configures the Sentry appender from XML in-process and checks what reachesMockSentryServer:userIdcontext tag and feature flag;RuntimeExceptionand the debug and info breadcrumbs;Two details:
sentry-appender-integration-test.xml, so it covers howlog4j2.xmlbinds the appender's attributes. The DSN reaches it through a${sys:...}lookup. The test builds aLoggerContextof its own from the file, soSentryAppenderTest's context keeps its configuration.sentry.properties, so the test uses the same external-configuration path, through thesentry.logs.enabledsystem property.With no system tests left, the sample comes off the runner and the backend workflow. It also drops the Kotlin plugin, which only the test needed.
sentry-log4j2gets Truth as a test dependency.💡 Motivation and Context
The log4j2 appender's XML binding now runs in
./gradlew :sentry-log4j2:test, in about 0.2 seconds.💚 How did you test it?
:sentry-log4j2:checkpasses, and the sample's JAR still builds.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The JUL sample, then the plain console sample.
#skip-changelog
🤖 Generated with Claude Code