You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Extract the OpenTelemetry agent test wiring into a convention plugin #6378
The Spring Boot 2, 3 and 4 modules each copy the same setup to run their OpenTelemetry agent tests in a child JVM: the agentFixture source set, the otelAgentJar configuration, runAgentFixture, and the integrationTestOtelAgentWithoutAutoInit task. The copies are identical; only the dependency lists differ. Each module also has to know that a plain project dependency on sentry-opentelemetry-agent gives the -dontuse jar, and that the real agent needs Bundling.SHADOWED and a non-transitive configuration.
Move the identical parts into one convention plugin in build-logic (e.g. io.sentry.otel-agent-tests), next to ChildJvmTestArguments:
create the agentFixture source set
create otelAgentJar and add the dependency on sentry-opentelemetry-agent
register the integrationTestOtelAgent suite wired to the child JVM, and the WithoutAutoInit task
The modules keep only their Boot-specific dependencies.
Also fix the comment in sentry-opentelemetry-agent/build.gradle.kts. The runtimeElements jar isn't just a by-product: it holds only AgentMarker, and the Boot modules' unit tests rely on it. The agent itself is shadowRuntimeElements.
Do this after the Boot 4 (#6317) and Boot 2 agent tests land, so the in-flight PRs don't need rewriting.
Activity
linear-code commentedon Oct 26, 2026
JAVA-801