Repository navigation
Commit d9b9fe9
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>1 parent 953d39a commit d9b9fe9
142 files changed
Lines changed: 5037 additions & 3754 deletions
File tree
- .github/workflows
- sentry-samples
- sentry-samples-spring-boot-4-opentelemetry-noagent
- src/test
- kotlin/io/sentry
- systemtest
- resources
- sentry-samples-spring-boot-jakarta-opentelemetry-noagent
- src/test
- kotlin/io/sentry
- systemtest
- resources
- sentry-samples-spring-boot-jakarta-opentelemetry
- src/test
- kotlin/io/sentry
- systemtest
- resources
- sentry-samples-spring-boot-opentelemetry-noagent
- src/test
- kotlin/io/sentry
- systemtest
- resources
- sentry-samples-spring-boot-webflux
- src/test
- kotlin/io/sentry
- systemtest
- resources
- sentry-spring-boot-4
- src/integrationTestOtelNoAgent
- kotlin/io/sentry/spring/boot4/otelnoagentintegrationtest
- resources
- graphql
- sentry-spring-boot-jakarta
- src
- agentFixture
- kotlin/io/sentry/spring/boot/jakarta/agentfixture
- resources
- graphql
- integrationTestOtelAgent/kotlin/io/sentry/spring/boot/jakarta
- otelagentintegrationtest
- integrationTestOtelNoAgent
- kotlin/io/sentry/spring/boot/jakarta/otelnoagentintegrationtest
- resources
- graphql
- sentry-spring-boot
- src
- integrationTestOtelNoAgent
- kotlin/io/sentry/spring/boot/otelnoagentintegrationtest
- resources
- graphql
- integrationTestWebflux
- kotlin/io/sentry/spring/boot/webfluxintegrationtest
- resources/graphql
- sentry-test-support/src
- main/kotlin/io/sentry/test
- test/kotlin/io/sentry/test
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | 78 | | |
81 | 79 | | |
82 | | - | |
83 | | - | |
84 | 80 | | |
85 | 81 | | |
86 | 82 | | |
87 | 83 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 84 | + | |
92 | 85 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
97 | 90 | | |
98 | 91 | | |
99 | 92 | | |
| |||
109 | 102 | | |
110 | 103 | | |
111 | 104 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 105 | | |
120 | 106 | | |
121 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 74 | | |
79 | | - | |
80 | | - | |
| 75 | + | |
81 | 76 | | |
82 | 77 | | |
83 | 78 | | |
84 | 79 | | |
85 | 80 | | |
86 | 81 | | |
| 82 | + | |
87 | 83 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 84 | + | |
| 85 | + | |
110 | 86 | | |
111 | 87 | | |
112 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
| |||
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
| 85 | + | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
| |||
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | 102 | | |
111 | 103 | | |
112 | 104 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 37 | | |
53 | 38 | | |
54 | 39 | | |
| |||
58 | 43 | | |
59 | 44 | | |
60 | 45 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 46 | | |
65 | 47 | | |
66 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | 56 | | |
69 | 57 | | |
70 | 58 | | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
0 commit comments