Repository navigation
build: Move OpenTelemetry agent test wiring into a convention plugin - #6551
Merged
Merged
Conversation
The Spring Boot 2, 3 and 4 modules each copied the setup that runs the agent tests in a child JVM. The io.sentry.otel-agent-tests plugin now owns it, so the modules keep only the dependencies of their Spring Boot line. Fixes #6378 Fixes JAVA-801 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
runningcode
requested review from
0xadam-brown and
markushi
and removed request for
a team
November 11, 2026 08:54
📲 Install BuildsAndroid
|
0xadam-brown
approved these changes
Nov 11, 2026
0xadam-brown
left a comment
Member
There was a problem hiding this comment.
Lgtm, and my clanker thinks so too. (Up to you if want to @adinauer to take a look as well.)
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.
📜 Description
The Spring Boot 2, 3 and 4 modules each had a copy of the setup that runs the OpenTelemetry agent tests in a child JVM. The copies were identical apart from their dependency lists. This moves them into one convention plugin,
io.sentry.otel-agent-tests, inbuild-logicnext toChildJvmTestArguments.The plugin:
agentFixturesource set for the appotelAgentJarand adds the dependency on the built (shadowed) agentintegrationTestOtelAgentsuite and theintegrationTestOtelAgentWithoutAutoInittask, both wired to the child JVMThe two agent entries in each module's
springBootMatrixblock were identical too, so they are now oneotelAgentTests()call.Each module keeps only the dependencies of its app and its suite. The suite's shared test dependencies (
sentry-test-support, JUnit, Truth) stay in the modules as well, so every suite lists its own dependencies the same way.This also rewrites the comment in
sentry-opentelemetry-agent/build.gradle.kts. The plainruntimeElementsjar isn't just a by-product: it holds onlyAgentMarker, and the Spring Boot modules' unit tests rely on it. The agent itself isshadowRuntimeElements.💡 Motivation and Context
Each module had to know that a plain project dependency on
sentry-opentelemetry-agentgives the-dontusejar, and that the real agent needsBundling.SHADOWEDand a non-transitive configuration. That knowledge now lives in one place.💚 How did you test it?
Ran
integrationTestOtelAgentandintegrationTestOtelAgentWithoutAutoInitin all three modules, plus both matrix tasks on the oldest version of each line (2.7.0, 3.2.12 and 4.0.0). All pass.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
🤖 Generated with Claude Code
#skip-changelog