Repository navigation
test(spring-boot): [Sample Tests 23] Port the Boot 3 OTel agent sample's Person, tracing and Todo tests - #6315
Conversation
📲 Install BuildsAndroid
|
5039d98 to
7332729
Compare
95dde03 to
f2ead28
Compare
46ed180 to
71ff17a
Compare
1fcb05f to
974a1ae
Compare
71ff17a to
8aea812
Compare
…g and Todo tests The agent tests now start the fixture app once per test JVM and share it, because it takes seconds to start. Which mode initializes Sentry is a property of the test task, so the suite's task runs with the agent initializing it and a new integrationTestOtelAgentWithoutAutoInit task runs the same tests with the Spring Boot starter doing it. Gradle runs the two in parallel. The fixture gains the Person POST, distributed tracing and Todo endpoints, and the suite ports the agent sample's Person, DistributedTracing and Todo tests. Sentry exports the agent's spans in batches every 5 seconds, which can't be configured, so each test waits for the next batch and the negative tracing check waits past one. ChildJvmApp now copies the app's output into the test's as it arrives instead of printing it on close. The shared app is closed when the JVM exits, where its whole log would otherwise land on the console. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
8aea812 to
ead5c63
Compare
974a1ae to
9b517a7
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9b517a7. Configure here.
| classpath = sources.runtimeClasspath | ||
| useJUnit() | ||
| runAgentFixture(autoInit = false) | ||
| } |
There was a problem hiding this comment.
Starter-init suite omitted from check
Medium Severity
integrationTestOtelAgentWithoutAutoInit is a standalone Test task, not a JVM test suite, and nothing adds it to check. The JVM Test Suite plugin only attaches suite tasks, so ./gradlew :sentry-spring-boot-jakarta:check runs agent auto-init only. The starter-init path — the one this PR says CI has likely never run — is skipped unless the task is named explicitly.
Triggered by project rule: PR Review Guidelines for Cursor Bugbot
Reviewed by Cursor Bugbot for commit 9b517a7. Configure here.
… agent sample's tests (#6316) * test(spring-boot): Port the rest of the Boot 3 OTel agent sample's tests The agent fixture gains the Cache, Metrics, GraphQL and Kafka endpoints, and the agent suite ports the sample's remaining tests in both init modes. The agent traces each GraphQL operation as one span named after it, so the queries are named. Kafka uses an in-JVM KRaft broker that the test JVM starts next to the app. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix. The matrix no longer builds the agent separately, because the suites build the jar they attach. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Check the Boot 3 agent GraphQL task query's assignee and creator ids Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
574efe9
into
no/boot2-otel-noagent-integration-test
…mple's tests (#6314) * test(spring-boot): Move the Boot 2 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot, the Boot 2 counterpart of the Boot 3 one. The sample's tests were the Boot 3 sample's minus Cache and RestClient, which Boot 2 doesn't have. GraphQL and Kafka are gated on Boot 2.7, as in the servlet suite, and Kafka gets a context of its own. Sentry is global, so a second live context re-initializes it with that context's OpenTelemetry SDK, and the Sentry API spans of the first context's tests went to the wrong one. Each test class therefore starts its own context and closes it afterwards. The sample has no system tests left, so it comes off the system-test runner and the Spring Boot 2 matrix, which now runs the new suite, and the backend workflow's base row moves to the console sample. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Port the tracing and GraphQL checks to Boot 2 no-agent and restore Metrics Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 23] Port the Boot 3 OTel agent sample's Person, tracing and Todo tests (#6315) * test(spring-boot): Port the Boot 3 OTel agent sample's Person, tracing and Todo tests The agent tests now start the fixture app once per test JVM and share it, because it takes seconds to start. Which mode initializes Sentry is a property of the test task, so the suite's task runs with the agent initializing it and a new integrationTestOtelAgentWithoutAutoInit task runs the same tests with the Spring Boot starter doing it. Gradle runs the two in parallel. The fixture gains the Person POST, distributed tracing and Todo endpoints, and the suite ports the agent sample's Person, DistributedTracing and Todo tests. Sentry exports the agent's spans in batches every 5 seconds, which can't be configured, so each test waits for the next batch and the negative tracing check waits past one. ChildJvmApp now copies the app's output into the test's as it arrives instead of printing it on close. The shared app is closed when the JVM exits, where its whole log would otherwise land on the console. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to the Boot 3 agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 24] Port the rest of the Boot 3 OTel agent sample's tests (#6316) * test(spring-boot): Port the rest of the Boot 3 OTel agent sample's tests The agent fixture gains the Cache, Metrics, GraphQL and Kafka endpoints, and the agent suite ports the sample's remaining tests in both init modes. The agent traces each GraphQL operation as one span named after it, so the queries are named. Kafka uses an in-JVM KRaft broker that the test JVM starts next to the app. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix. The matrix no longer builds the agent separately, because the suites build the jar they attach. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Check the Boot 3 agent GraphQL task query's assignee and creator ids Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…mple's tests (#6313) * test(spring-boot): Move the Boot 4 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-4, the Boot 4 counterpart of the Boot 3 one: the app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring. The sample's tests were the same as the Boot 3 sample's, minus Cache, so the suite is the Boot 3 one with Boot 4's packages and no Cache test. Its Metrics tests were copies of the servlet ones and don't depend on tracing. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 4 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 4 no-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 22] Move the Boot 2 OTel no-agent sample's tests (#6314) * test(spring-boot): Move the Boot 2 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot, the Boot 2 counterpart of the Boot 3 one. The sample's tests were the Boot 3 sample's minus Cache and RestClient, which Boot 2 doesn't have. GraphQL and Kafka are gated on Boot 2.7, as in the servlet suite, and Kafka gets a context of its own. Sentry is global, so a second live context re-initializes it with that context's OpenTelemetry SDK, and the Sentry API spans of the first context's tests went to the wrong one. Each test class therefore starts its own context and closes it afterwards. The sample has no system tests left, so it comes off the system-test runner and the Spring Boot 2 matrix, which now runs the new suite, and the backend workflow's base row moves to the console sample. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Port the tracing and GraphQL checks to Boot 2 no-agent and restore Metrics Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 23] Port the Boot 3 OTel agent sample's Person, tracing and Todo tests (#6315) * test(spring-boot): Port the Boot 3 OTel agent sample's Person, tracing and Todo tests The agent tests now start the fixture app once per test JVM and share it, because it takes seconds to start. Which mode initializes Sentry is a property of the test task, so the suite's task runs with the agent initializing it and a new integrationTestOtelAgentWithoutAutoInit task runs the same tests with the Spring Boot starter doing it. Gradle runs the two in parallel. The fixture gains the Person POST, distributed tracing and Todo endpoints, and the suite ports the agent sample's Person, DistributedTracing and Todo tests. Sentry exports the agent's spans in batches every 5 seconds, which can't be configured, so each test waits for the next batch and the negative tracing check waits past one. ChildJvmApp now copies the app's output into the test's as it arrives instead of printing it on close. The shared app is closed when the JVM exits, where its whole log would otherwise land on the console. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to the Boot 3 agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 24] Port the rest of the Boot 3 OTel agent sample's tests (#6316) * test(spring-boot): Port the rest of the Boot 3 OTel agent sample's tests The agent fixture gains the Cache, Metrics, GraphQL and Kafka endpoints, and the agent suite ports the sample's remaining tests in both init modes. The agent traces each GraphQL operation as one span named after it, so the queries are named. Kafka uses an in-JVM KRaft broker that the test JVM starts next to the app. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix. The matrix no longer builds the agent separately, because the suites build the jar they attach. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Check the Boot 3 agent GraphQL task query's assignee and creator ids Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…mple's tests (#6312) * test(spring-boot): Move the Boot 3 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-jakarta. The app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring, and the suite ports the no-agent sample's tests: spans from the OTel annotation, the OTel API and the Sentry API with their feature flags, the OTel database span, trace continuation, client spans, cache spans, GraphQL, and Kafka traced by OTel instead of Sentry's Spring Kafka integration. The sample's Metrics tests were copies of the servlet ones and don't depend on tracing. The suite needs a TestRestTemplate built outside the context: the one Spring Boot provides is instrumented by the OTel starter, which replaced the trace headers the tests send and started a new trace. Sentry exports OTel spans in batches every 5 seconds, so every test waited that long. MockSentryServer gets a hook that runs before each check while waiting, which the suite uses to flush the tracer provider, taking the suite from about 112s to 8s of test time. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Rejoin a wrapped comment in the Boot 3 OTel no-agent suite Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 3 no-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 21] Move the Boot 4 OTel no-agent sample's tests (#6313) * test(spring-boot): Move the Boot 4 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-4, the Boot 4 counterpart of the Boot 3 one: the app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring. The sample's tests were the same as the Boot 3 sample's, minus Cache, so the suite is the Boot 3 one with Boot 4's packages and no Cache test. Its Metrics tests were copies of the servlet ones and don't depend on tracing. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 4 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 4 no-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 22] Move the Boot 2 OTel no-agent sample's tests (#6314) * test(spring-boot): Move the Boot 2 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot, the Boot 2 counterpart of the Boot 3 one. The sample's tests were the Boot 3 sample's minus Cache and RestClient, which Boot 2 doesn't have. GraphQL and Kafka are gated on Boot 2.7, as in the servlet suite, and Kafka gets a context of its own. Sentry is global, so a second live context re-initializes it with that context's OpenTelemetry SDK, and the Sentry API spans of the first context's tests went to the wrong one. Each test class therefore starts its own context and closes it afterwards. The sample has no system tests left, so it comes off the system-test runner and the Spring Boot 2 matrix, which now runs the new suite, and the backend workflow's base row moves to the console sample. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Port the tracing and GraphQL checks to Boot 2 no-agent and restore Metrics Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 23] Port the Boot 3 OTel agent sample's Person, tracing and Todo tests (#6315) * test(spring-boot): Port the Boot 3 OTel agent sample's Person, tracing and Todo tests The agent tests now start the fixture app once per test JVM and share it, because it takes seconds to start. Which mode initializes Sentry is a property of the test task, so the suite's task runs with the agent initializing it and a new integrationTestOtelAgentWithoutAutoInit task runs the same tests with the Spring Boot starter doing it. Gradle runs the two in parallel. The fixture gains the Person POST, distributed tracing and Todo endpoints, and the suite ports the agent sample's Person, DistributedTracing and Todo tests. Sentry exports the agent's spans in batches every 5 seconds, which can't be configured, so each test waits for the next batch and the negative tracing check waits past one. ChildJvmApp now copies the app's output into the test's as it arrives instead of printing it on close. The shared app is closed when the JVM exits, where its whole log would otherwise land on the console. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to the Boot 3 agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 24] Port the rest of the Boot 3 OTel agent sample's tests (#6316) * test(spring-boot): Port the rest of the Boot 3 OTel agent sample's tests The agent fixture gains the Cache, Metrics, GraphQL and Kafka endpoints, and the agent suite ports the sample's remaining tests in both init modes. The agent traces each GraphQL operation as one span named after it, so the queries are named. Kafka uses an in-JVM KRaft broker that the test JVM starts next to the app. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix. The matrix no longer builds the agent separately, because the suites build the jar they attach. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Check the Boot 3 agent GraphQL task query's assignee and creator ids Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… tests into the module (#6311) * test(spring-boot): Move the Boot 2 WebFlux sample's tests into the module Adds an integrationTestWebflux suite to sentry-spring-boot that mirrors the Boot 3 one, without the Reactor thread-local accessor that Spring Boot 2's Reactor lacks. The GraphQL greeting lives in its own file so the suite can leave it out below Spring Boot 2.7, like the servlet suite's GraphQL. The Boot 2 WebFlux sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 2 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Tighten the Boot 2 WebFlux tracing checks and restore Metrics Ports the tracing checks and the plain test client from the servlet suite, and runs the WebFlux sample's Metrics tests in the reactive app too, rather than only in the servlet suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Return a Mono from the Boot 2 WebFlux GraphQL resolver The sample's resolver returned a Mono, so its test covered Sentry finishing the field's span when the Mono completes. The port returned a String, which only covers the synchronous path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 20] Move the Boot 3 OTel no-agent sample's tests (#6312) * test(spring-boot): Move the Boot 3 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-jakarta. The app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring, and the suite ports the no-agent sample's tests: spans from the OTel annotation, the OTel API and the Sentry API with their feature flags, the OTel database span, trace continuation, client spans, cache spans, GraphQL, and Kafka traced by OTel instead of Sentry's Spring Kafka integration. The sample's Metrics tests were copies of the servlet ones and don't depend on tracing. The suite needs a TestRestTemplate built outside the context: the one Spring Boot provides is instrumented by the OTel starter, which replaced the trace headers the tests send and started a new trace. Sentry exports OTel spans in batches every 5 seconds, so every test waited that long. MockSentryServer gets a hook that runs before each check while waiting, which the suite uses to flush the tracer provider, taking the suite from about 112s to 8s of test time. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Rejoin a wrapped comment in the Boot 3 OTel no-agent suite Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 3 no-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 21] Move the Boot 4 OTel no-agent sample's tests (#6313) * test(spring-boot): Move the Boot 4 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-4, the Boot 4 counterpart of the Boot 3 one: the app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring. The sample's tests were the same as the Boot 3 sample's, minus Cache, so the suite is the Boot 3 one with Boot 4's packages and no Cache test. Its Metrics tests were copies of the servlet ones and don't depend on tracing. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 4 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 4 no-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 22] Move the Boot 2 OTel no-agent sample's tests (#6314) * test(spring-boot): Move the Boot 2 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot, the Boot 2 counterpart of the Boot 3 one. The sample's tests were the Boot 3 sample's minus Cache and RestClient, which Boot 2 doesn't have. GraphQL and Kafka are gated on Boot 2.7, as in the servlet suite, and Kafka gets a context of its own. Sentry is global, so a second live context re-initializes it with that context's OpenTelemetry SDK, and the Sentry API spans of the first context's tests went to the wrong one. Each test class therefore starts its own context and closes it afterwards. The sample has no system tests left, so it comes off the system-test runner and the Spring Boot 2 matrix, which now runs the new suite, and the backend workflow's base row moves to the console sample. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Port the tracing and GraphQL checks to Boot 2 no-agent and restore Metrics Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 23] Port the Boot 3 OTel agent sample's Person, tracing and Todo tests (#6315) * test(spring-boot): Port the Boot 3 OTel agent sample's Person, tracing and Todo tests The agent tests now start the fixture app once per test JVM and share it, because it takes seconds to start. Which mode initializes Sentry is a property of the test task, so the suite's task runs with the agent initializing it and a new integrationTestOtelAgentWithoutAutoInit task runs the same tests with the Spring Boot starter doing it. Gradle runs the two in parallel. The fixture gains the Person POST, distributed tracing and Todo endpoints, and the suite ports the agent sample's Person, DistributedTracing and Todo tests. Sentry exports the agent's spans in batches every 5 seconds, which can't be configured, so each test waits for the next batch and the negative tracing check waits past one. ChildJvmApp now copies the app's output into the test's as it arrives instead of printing it on close. The shared app is closed when the JVM exits, where its whole log would otherwise land on the console. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to the Boot 3 agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 24] Port the rest of the Boot 3 OTel agent sample's tests (#6316) * test(spring-boot): Port the rest of the Boot 3 OTel agent sample's tests The agent fixture gains the Cache, Metrics, GraphQL and Kafka endpoints, and the agent suite ports the sample's remaining tests in both init modes. The agent traces each GraphQL operation as one span named after it, so the queries are named. Kafka uses an in-JVM KRaft broker that the test JVM starts next to the app. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix. The matrix no longer builds the agent separately, because the suites build the jar they attach. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Check the Boot 3 agent GraphQL task query's assignee and creator ids Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… tests into the module (#6310) * test(spring-boot): Move the Boot 4 WebFlux sample's tests into the module Adds an integrationTestWebflux suite to sentry-spring-boot-4 that mirrors the Boot 3 one, adjusted for Spring Boot 4: the webclient starter for WebClient.Builder, the restclient starter that TestRestTemplate needs, Jackson 3, and @AutoConfigureTestRestTemplate. The Todo test reads the port with @LocalServerPort because TestRestTemplate's root URI doesn't hold the port on Boot 4.0. The Boot 4 WebFlux sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 4 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 4 WebFlux Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Return a Mono from the Boot 4 WebFlux GraphQL resolver The sample's resolver returned a Mono, so its test covered Sentry finishing the field's span when the Mono completes. The port returned a String, which only covers the synchronous path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 19] Move the Boot 2 WebFlux sample's tests into the module (#6311) * test(spring-boot): Move the Boot 2 WebFlux sample's tests into the module Adds an integrationTestWebflux suite to sentry-spring-boot that mirrors the Boot 3 one, without the Reactor thread-local accessor that Spring Boot 2's Reactor lacks. The GraphQL greeting lives in its own file so the suite can leave it out below Spring Boot 2.7, like the servlet suite's GraphQL. The Boot 2 WebFlux sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 2 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Tighten the Boot 2 WebFlux tracing checks and restore Metrics Ports the tracing checks and the plain test client from the servlet suite, and runs the WebFlux sample's Metrics tests in the reactive app too, rather than only in the servlet suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Return a Mono from the Boot 2 WebFlux GraphQL resolver The sample's resolver returned a Mono, so its test covered Sentry finishing the field's span when the Mono completes. The port returned a String, which only covers the synchronous path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 20] Move the Boot 3 OTel no-agent sample's tests (#6312) * test(spring-boot): Move the Boot 3 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-jakarta. The app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring, and the suite ports the no-agent sample's tests: spans from the OTel annotation, the OTel API and the Sentry API with their feature flags, the OTel database span, trace continuation, client spans, cache spans, GraphQL, and Kafka traced by OTel instead of Sentry's Spring Kafka integration. The sample's Metrics tests were copies of the servlet ones and don't depend on tracing. The suite needs a TestRestTemplate built outside the context: the one Spring Boot provides is instrumented by the OTel starter, which replaced the trace headers the tests send and started a new trace. Sentry exports OTel spans in batches every 5 seconds, so every test waited that long. MockSentryServer gets a hook that runs before each check while waiting, which the suite uses to flush the tracer provider, taking the suite from about 112s to 8s of test time. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Rejoin a wrapped comment in the Boot 3 OTel no-agent suite Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 3 no-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 21] Move the Boot 4 OTel no-agent sample's tests (#6313) * test(spring-boot): Move the Boot 4 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-4, the Boot 4 counterpart of the Boot 3 one: the app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring. The sample's tests were the same as the Boot 3 sample's, minus Cache, so the suite is the Boot 3 one with Boot 4's packages and no Cache test. Its Metrics tests were copies of the servlet ones and don't depend on tracing. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 4 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 4 no-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 22] Move the Boot 2 OTel no-agent sample's tests (#6314) * test(spring-boot): Move the Boot 2 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot, the Boot 2 counterpart of the Boot 3 one. The sample's tests were the Boot 3 sample's minus Cache and RestClient, which Boot 2 doesn't have. GraphQL and Kafka are gated on Boot 2.7, as in the servlet suite, and Kafka gets a context of its own. Sentry is global, so a second live context re-initializes it with that context's OpenTelemetry SDK, and the Sentry API spans of the first context's tests went to the wrong one. Each test class therefore starts its own context and closes it afterwards. The sample has no system tests left, so it comes off the system-test runner and the Spring Boot 2 matrix, which now runs the new suite, and the backend workflow's base row moves to the console sample. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Port the tracing and GraphQL checks to Boot 2 no-agent and restore Metrics Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 23] Port the Boot 3 OTel agent sample's Person, tracing and Todo tests (#6315) * test(spring-boot): Port the Boot 3 OTel agent sample's Person, tracing and Todo tests The agent tests now start the fixture app once per test JVM and share it, because it takes seconds to start. Which mode initializes Sentry is a property of the test task, so the suite's task runs with the agent initializing it and a new integrationTestOtelAgentWithoutAutoInit task runs the same tests with the Spring Boot starter doing it. Gradle runs the two in parallel. The fixture gains the Person POST, distributed tracing and Todo endpoints, and the suite ports the agent sample's Person, DistributedTracing and Todo tests. Sentry exports the agent's spans in batches every 5 seconds, which can't be configured, so each test waits for the next batch and the negative tracing check waits past one. ChildJvmApp now copies the app's output into the test's as it arrives instead of printing it on close. The shared app is closed when the JVM exits, where its whole log would otherwise land on the console. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to the Boot 3 agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 24] Port the rest of the Boot 3 OTel agent sample's tests (#6316) * test(spring-boot): Port the rest of the Boot 3 OTel agent sample's tests The agent fixture gains the Cache, Metrics, GraphQL and Kafka endpoints, and the agent suite ports the sample's remaining tests in both init modes. The agent traces each GraphQL operation as one span named after it, so the queries are named. Kafka uses an in-JVM KRaft broker that the test JVM starts next to the app. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix. The matrix no longer builds the agent separately, because the suites build the jar they attach. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Check the Boot 3 agent GraphQL task query's assignee and creator ids Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… tests into the module (#6308) * test(spring-boot): Move the Boot 3 WebFlux sample's tests into the module Adds an integrationTestWebflux suite to sentry-spring-boot-jakarta. It runs a reactive app without the servlet stack, so Spring Boot starts a WebFlux server, and ports the WebFlux sample's Person, DistributedTracing, Todo and GraphQL tests. The sample's Cache and Metrics tests were copies of the servlet ones and don't depend on the web stack, so the integrationTest suite already covers them. The WebFlux sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Tighten the Boot 3 WebFlux tracing checks and restore Cache and Metrics Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Return a Mono from the Boot 3 WebFlux GraphQL resolver The sample's resolver returned a Mono, so its test covered Sentry finishing the field's span when the Mono completes. The port returned a String, which only covers the synchronous path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 18] Move the Boot 4 WebFlux sample's tests into the module (#6310) * test(spring-boot): Move the Boot 4 WebFlux sample's tests into the module Adds an integrationTestWebflux suite to sentry-spring-boot-4 that mirrors the Boot 3 one, adjusted for Spring Boot 4: the webclient starter for WebClient.Builder, the restclient starter that TestRestTemplate needs, Jackson 3, and @AutoConfigureTestRestTemplate. The Todo test reads the port with @LocalServerPort because TestRestTemplate's root URI doesn't hold the port on Boot 4.0. The Boot 4 WebFlux sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 4 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 4 WebFlux Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Return a Mono from the Boot 4 WebFlux GraphQL resolver The sample's resolver returned a Mono, so its test covered Sentry finishing the field's span when the Mono completes. The port returned a String, which only covers the synchronous path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 19] Move the Boot 2 WebFlux sample's tests into the module (#6311) * test(spring-boot): Move the Boot 2 WebFlux sample's tests into the module Adds an integrationTestWebflux suite to sentry-spring-boot that mirrors the Boot 3 one, without the Reactor thread-local accessor that Spring Boot 2's Reactor lacks. The GraphQL greeting lives in its own file so the suite can leave it out below Spring Boot 2.7, like the servlet suite's GraphQL. The Boot 2 WebFlux sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 2 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Tighten the Boot 2 WebFlux tracing checks and restore Metrics Ports the tracing checks and the plain test client from the servlet suite, and runs the WebFlux sample's Metrics tests in the reactive app too, rather than only in the servlet suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Return a Mono from the Boot 2 WebFlux GraphQL resolver The sample's resolver returned a Mono, so its test covered Sentry finishing the field's span when the Mono completes. The port returned a String, which only covers the synchronous path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 20] Move the Boot 3 OTel no-agent sample's tests (#6312) * test(spring-boot): Move the Boot 3 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-jakarta. The app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring, and the suite ports the no-agent sample's tests: spans from the OTel annotation, the OTel API and the Sentry API with their feature flags, the OTel database span, trace continuation, client spans, cache spans, GraphQL, and Kafka traced by OTel instead of Sentry's Spring Kafka integration. The sample's Metrics tests were copies of the servlet ones and don't depend on tracing. The suite needs a TestRestTemplate built outside the context: the one Spring Boot provides is instrumented by the OTel starter, which replaced the trace headers the tests send and started a new trace. Sentry exports OTel spans in batches every 5 seconds, so every test waited that long. MockSentryServer gets a hook that runs before each check while waiting, which the suite uses to flush the tracer provider, taking the suite from about 112s to 8s of test time. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Rejoin a wrapped comment in the Boot 3 OTel no-agent suite Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 3 no-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 21] Move the Boot 4 OTel no-agent sample's tests (#6313) * test(spring-boot): Move the Boot 4 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-4, the Boot 4 counterpart of the Boot 3 one: the app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring. The sample's tests were the same as the Boot 3 sample's, minus Cache, so the suite is the Boot 3 one with Boot 4's packages and no Cache test. Its Metrics tests were copies of the servlet ones and don't depend on tracing. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 4 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 4 no-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 22] Move the Boot 2 OTel no-agent sample's tests (#6314) * test(spring-boot): Move the Boot 2 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot, the Boot 2 counterpart of the Boot 3 one. The sample's tests were the Boot 3 sample's minus Cache and RestClient, which Boot 2 doesn't have. GraphQL and Kafka are gated on Boot 2.7, as in the servlet suite, and Kafka gets a context of its own. Sentry is global, so a second live context re-initializes it with that context's OpenTelemetry SDK, and the Sentry API spans of the first context's tests went to the wrong one. Each test class therefore starts its own context and closes it afterwards. The sample has no system tests left, so it comes off the system-test runner and the Spring Boot 2 matrix, which now runs the new suite, and the backend workflow's base row moves to the console sample. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Port the tracing and GraphQL checks to Boot 2 no-agent and restore Metrics Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 23] Port the Boot 3 OTel agent sample's Person, tracing and Todo tests (#6315) * test(spring-boot): Port the Boot 3 OTel agent sample's Person, tracing and Todo tests The agent tests now start the fixture app once per test JVM and share it, because it takes seconds to start. Which mode initializes Sentry is a property of the test task, so the suite's task runs with the agent initializing it and a new integrationTestOtelAgentWithoutAutoInit task runs the same tests with the Spring Boot starter doing it. Gradle runs the two in parallel. The fixture gains the Person POST, distributed tracing and Todo endpoints, and the suite ports the agent sample's Person, DistributedTracing and Todo tests. Sentry exports the agent's spans in batches every 5 seconds, which can't be configured, so each test waits for the next batch and the negative tracing check waits past one. ChildJvmApp now copies the app's output into the test's as it arrives instead of printing it on close. The shared app is closed when the JVM exits, where its whole log would otherwise land on the console. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to the Boot 3 agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 24] Port the rest of the Boot 3 OTel agent sample's tests (#6316) * test(spring-boot): Port the rest of the Boot 3 OTel agent sample's tests The agent fixture gains the Cache, Metrics, GraphQL and Kafka endpoints, and the agent suite ports the sample's remaining tests in both init modes. The agent traces each GraphQL operation as one span named after it, so the queries are named. Kafka uses an in-JVM KRaft broker that the test JVM starts next to the app. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix. The matrix no longer builds the agent separately, because the suites build the jar they attach. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Check the Boot 3 agent GraphQL task query's assignee and creator ids Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… system tests with a Log4j2 suite (#6306) * test(spring-boot): Remove the log4j2 Boot samples' system tests The jakarta-log4j2 and 4-log4j2 samples' system tests were copies of the plain samples' tests, which now run in the modules' integrationTest suites. The only addition was a check that a logged error carries the Log4j integration. That's covered by SentryLog4j2AppenderAutoConfigurationTest, which checks the appender Spring Boot attaches, and by sentry-log4j2's own tests of what the appender sends. Both samples come off the system-test runner and the backend workflow. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Test the auto-configured Log4j2 appender end to end The log4j2 Boot samples' tests were removed as covered elsewhere, but nothing else sends an event through the Log4j2 appender that Spring Boot's auto-configuration attaches. integrationTestLog4j2, in sentry-spring-boot-jakarta and sentry-spring-boot-4, runs a servlet app with Log4j2 instead of Logback and checks that an error logged through SLF4J reaches Sentry with the request's feature flag and the Log4j integration, as the samples' Person test did. Gradle's module replacement swaps the starters, as Spring Boot documents. It only acts on a classpath with both, which only this suite has. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 17] Move the Boot 3 WebFlux sample's tests into the module (#6308) * test(spring-boot): Move the Boot 3 WebFlux sample's tests into the module Adds an integrationTestWebflux suite to sentry-spring-boot-jakarta. It runs a reactive app without the servlet stack, so Spring Boot starts a WebFlux server, and ports the WebFlux sample's Person, DistributedTracing, Todo and GraphQL tests. The sample's Cache and Metrics tests were copies of the servlet ones and don't depend on the web stack, so the integrationTest suite already covers them. The WebFlux sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Tighten the Boot 3 WebFlux tracing checks and restore Cache and Metrics Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Return a Mono from the Boot 3 WebFlux GraphQL resolver The sample's resolver returned a Mono, so its test covered Sentry finishing the field's span when the Mono completes. The port returned a String, which only covers the synchronous path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 18] Move the Boot 4 WebFlux sample's tests into the module (#6310) * test(spring-boot): Move the Boot 4 WebFlux sample's tests into the module Adds an integrationTestWebflux suite to sentry-spring-boot-4 that mirrors the Boot 3 one, adjusted for Spring Boot 4: the webclient starter for WebClient.Builder, the restclient starter that TestRestTemplate needs, Jackson 3, and @AutoConfigureTestRestTemplate. The Todo test reads the port with @LocalServerPort because TestRestTemplate's root URI doesn't hold the port on Boot 4.0. The Boot 4 WebFlux sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 4 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 4 WebFlux Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Return a Mono from the Boot 4 WebFlux GraphQL resolver The sample's resolver returned a Mono, so its test covered Sentry finishing the field's span when the Mono completes. The port returned a String, which only covers the synchronous path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 19] Move the Boot 2 WebFlux sample's tests into the module (#6311) * test(spring-boot): Move the Boot 2 WebFlux sample's tests into the module Adds an integrationTestWebflux suite to sentry-spring-boot that mirrors the Boot 3 one, without the Reactor thread-local accessor that Spring Boot 2's Reactor lacks. The GraphQL greeting lives in its own file so the suite can leave it out below Spring Boot 2.7, like the servlet suite's GraphQL. The Boot 2 WebFlux sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 2 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Tighten the Boot 2 WebFlux tracing checks and restore Metrics Ports the tracing checks and the plain test client from the servlet suite, and runs the WebFlux sample's Metrics tests in the reactive app too, rather than only in the servlet suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Return a Mono from the Boot 2 WebFlux GraphQL resolver The sample's resolver returned a Mono, so its test covered Sentry finishing the field's span when the Mono completes. The port returned a String, which only covers the synchronous path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 20] Move the Boot 3 OTel no-agent sample's tests (#6312) * test(spring-boot): Move the Boot 3 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-jakarta. The app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring, and the suite ports the no-agent sample's tests: spans from the OTel annotation, the OTel API and the Sentry API with their feature flags, the OTel database span, trace continuation, client spans, cache spans, GraphQL, and Kafka traced by OTel instead of Sentry's Spring Kafka integration. The sample's Metrics tests were copies of the servlet ones and don't depend on tracing. The suite needs a TestRestTemplate built outside the context: the one Spring Boot provides is instrumented by the OTel starter, which replaced the trace headers the tests send and started a new trace. Sentry exports OTel spans in batches every 5 seconds, so every test waited that long. MockSentryServer gets a hook that runs before each check while waiting, which the suite uses to flush the tracer provider, taking the suite from about 112s to 8s of test time. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Rejoin a wrapped comment in the Boot 3 OTel no-agent suite Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 3 no-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 21] Move the Boot 4 OTel no-agent sample's tests (#6313) * test(spring-boot): Move the Boot 4 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot-4, the Boot 4 counterpart of the Boot 3 one: the app traces through the OpenTelemetry SDK in its own JVM, set up by sentry-opentelemetry-agentless-spring. The sample's tests were the same as the Boot 3 sample's, minus Cache, so the suite is the Boot 3 one with Boot 4's packages and no Cache test. Its Metrics tests were copies of the servlet ones and don't depend on tracing. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 4 matrix, which now runs the new suite. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to Boot 4 no-agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 22] Move the Boot 2 OTel no-agent sample's tests (#6314) * test(spring-boot): Move the Boot 2 OTel no-agent sample's tests into the module Adds an integrationTestOtelNoAgent suite to sentry-spring-boot, the Boot 2 counterpart of the Boot 3 one. The sample's tests were the Boot 3 sample's minus Cache and RestClient, which Boot 2 doesn't have. GraphQL and Kafka are gated on Boot 2.7, as in the servlet suite, and Kafka gets a context of its own. Sentry is global, so a second live context re-initializes it with that context's OpenTelemetry SDK, and the Sentry API spans of the first context's tests went to the wrong one. Each test class therefore starts its own context and closes it afterwards. The sample has no system tests left, so it comes off the system-test runner and the Spring Boot 2 matrix, which now runs the new suite, and the backend workflow's base row moves to the console sample. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Port the tracing and GraphQL checks to Boot 2 no-agent and restore Metrics Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 23] Port the Boot 3 OTel agent sample's Person, tracing and Todo tests (#6315) * test(spring-boot): Port the Boot 3 OTel agent sample's Person, tracing and Todo tests The agent tests now start the fixture app once per test JVM and share it, because it takes seconds to start. Which mode initializes Sentry is a property of the test task, so the suite's task runs with the agent initializing it and a new integrationTestOtelAgentWithoutAutoInit task runs the same tests with the Spring Boot starter doing it. Gradle runs the two in parallel. The fixture gains the Person POST, distributed tracing and Todo endpoints, and the suite ports the agent sample's Person, DistributedTracing and Todo tests. Sentry exports the agent's spans in batches every 5 seconds, which can't be configured, so each test waits for the next batch and the negative tracing check waits past one. ChildJvmApp now copies the app's output into the test's as it arrives instead of printing it on close. The shared app is closed when the JVM exits, where its whole log would otherwise land on the console. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test: Port the audit fixes to the Boot 3 agent Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): [Sample Tests 24] Port the rest of the Boot 3 OTel agent sample's tests (#6316) * test(spring-boot): Port the rest of the Boot 3 OTel agent sample's tests The agent fixture gains the Cache, Metrics, GraphQL and Kafka endpoints, and the agent suite ports the sample's remaining tests in both init modes. The agent traces each GraphQL operation as one span named after it, so the queries are named. Kafka uses an in-JVM KRaft broker that the test JVM starts next to the app. The sample has no system tests left, so it comes off the system-test runner, the backend workflow and the Spring Boot 3 matrix. The matrix no longer builds the agent separately, because the suites build the jar they attach. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(spring-boot): Check the Boot 3 agent GraphQL task query's assignee and creator ids Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>


PR Stack (Sample Tests)
main)📜 Description
Grows #6271's agent suite in
sentry-spring-boot-jakartafrom a single Person request into a port ofsentry-samples-spring-boot-jakarta-opentelemetry's Person, DistributedTracing and Todo tests. The sample's Cache, Metrics, GraphQL and Kafka tests follow in the next PR, which retires the sample.One app per test JVM. The fixture app runs in a child JVM with the built agent attached and takes seconds to start. It used to start once per test; now
AgentAppstarts it on first use, every test class shares it, and it stops when the JVM exits. The tests themselves are the no-agent suite's (#6312), adapted to the agent sample:@WithSpanis gone, because the agent sample doesn't use it.One task per init mode. Whether the agent or the Spring Boot starter initializes Sentry is now a property of the task:
integrationTestOtelAgentruns with the agent initializing Sentry.integrationTestOtelAgentWithoutAutoInitruns the same tests withSENTRY_AUTO_INIT=false, so the Spring Boot starter does it.Gradle runs the two in parallel. Both are in the Boot 3 matrix. The Person test still checks the SDK name, which shows that each mode takes its own init path.
Speed. Sentry exports the agent's spans through a
BatchSpanProcessorwith a fixed 5-second schedule. In the app's JVM there's no way to flush it, as #6312 does in-process. Each test that waits for a transaction waits for the next batch, so the tests take about 5 seconds each: about 66s per mode for 13 tests, with both modes in parallel. The runner spent about 10 seconds per test. The unsampled-trace check waits 6 seconds, so it covers a full batch.App output.
ChildJvmAppnow copies the app's output into the test's as it arrives, rather than printing it onclose(). The shared app closes when the JVM exits, and its whole log (1,200 lines, mostly the stack traces of the intentionally failing requests) would otherwise land on the console. This way Gradle's test report shows each line with the test that was running.After a coverage audit against the sample's tests:
sample_randand deferred-sampling tests check the envelope header's trace ID.💡 Motivation and Context
These are the first in-module tests that exercise the agent in both init modes across Person, tracing and Todo. In CI, the sample's
auto-init=falserun restoressystemTestfrom cache, so it has likely never run.💚 How did you test it?
WithoutAutoInittask.AgentSmokeTeststill passes.:sentry-spring-boot-jakarta:checkand:sentry-test-support:checkpass.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
The agent sample's Cache, Metrics, GraphQL and Kafka tests, which retire the sample.
#skip-changelog
🤖 Generated with Claude Code