Repository navigation
Commit fdcd080
test(log4j2): [Sample Tests 30] Move the log4j2 sample's system test into sentry-log4j2 (#6322)
* test(log4j2): Move the log4j2 sample's system test into sentry-log4j2
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>
* test(jul): [Sample Tests 31] Move the JUL sample's system test into sentry-jul (#6323)
* test(jul): Move the JUL sample's system test into sentry-jul
Adds SentryHandlerIntegrationTest, which configures the Sentry handler
through a logging properties file read by LogManager, as the sample
does, and checks what reaches MockSentryServer: the warning with its
flag, the error with its exception and breadcrumbs, and the logs with
their attributes. Its logger is outside io.sentry, whose loggers the
handler drops, and the test restores the LogManager configuration the
other tests read.
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>
* test: [Sample Tests 32] Add end-to-end tests of the core APIs and a profiled transaction (#6324)
* test(core): Add an end-to-end test of the core APIs over the HTTP transport
SentryEndToEndTest reports through the APIs an app uses without
integrations and checks what reaches MockSentryServer: messages at the
scope's and an explicit level, an exception with its feature flag, an
event with a fingerprint, breadcrumbs from an event processor and a
beforeBreadcrumb callback, ten events in a row, a transaction with a
child span, and metrics with the scope's attributes.
It ports the core part of the console sample's system test, which ran
the sample's JAR against the Python mock server. The sample's profiling
and Kafka parts follow in their own modules.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Merge the audit fixes from the branches below, and check the exception type end to end
The console sample's test checked that the captured exception arrives
with its type, RuntimeException, not just its value.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(core): Check that the shutdown hook delivers what an app reported before exiting
The console samples' system tests ran each sample in its own JVM,
asserted that it exited with 0 within 30 seconds, and relied on the
shutdown hook to send everything, because the samples never flush or
close Sentry. The in-process end-to-end tests flush explicitly, so
neither the clean exit nor the hook's flush was tested any more.
Run a small app in a child JVM that returns from main without flushing,
and check that it exits with 0 and that its event, log and metric
arrive.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(async-profiler): Add an end-to-end test of a profiled transaction
ContinuousProfilerEndToEndTest starts a sampled transaction with the
TRACE profile lifecycle and checks that its profile chunk reaches
MockSentryServer, linked to the transaction by the profiler ID. It
ports the profiling part of the console sample's system test.
The profiler rejects a traces path with a dot anywhere in its absolute
form, so the test puts it in the temp dir.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(kafka): [Sample Tests 34] Add an end-to-end test of the raw Kafka client's tracing (#6326)
* test(async-profiler): Add an end-to-end test of a profiled transaction
ContinuousProfilerEndToEndTest starts a sampled transaction with the
TRACE profile lifecycle and checks that its profile chunk reaches
MockSentryServer, linked to the transaction by the profiler ID. It
ports the profiling part of the console sample's system test.
The profiler rejects a traces path with a dot anywhere in its absolute
form, so the test puts it in the temp dir.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(kafka): Add an end-to-end test of the raw Kafka client's tracing
SentryKafkaEndToEndTest publishes a message through a wrapped
KafkaProducer to an in-JVM KRaft broker, consumes it with
SentryKafkaConsumerTracing, and checks what reaches MockSentryServer:
the queue.publish span in the producing transaction, and a queue.process
transaction with the consumer origin and the Kafka system that continues
the producer's trace. It ports the Kafka part of the console sample's
system test, which needed a Redpanda container.
The broker comes from spring-kafka-test 3, which needs Java 17, so the
test classpaths resolve Java 17 variants. The tests run on it anyway.
With its core, profiling and Kafka parts ported, the console sample has
no system test left, so it comes off the system-test runner and the
backend workflow, whose base row moves to the console OTLP sample.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(opentelemetry): [Sample Tests 35] Add an end-to-end test of the agentless OpenTelemetry setup (#6327)
* test(opentelemetry): Add an end-to-end test of the agentless OpenTelemetry setup
AgentlessEndToEndTest builds the OpenTelemetry SDK through its
autoconfiguration, which loads Sentry's customizer, and checks what
reaches MockSentryServer: events, a transaction traced through
OpenTelemetry with its child span and profile, and metrics. It ports
sentry-samples-console-opentelemetry-noagent's system test, which no CI
job ran.
The customizer only initializes Sentry when the environment asks it to,
so the test task sets SENTRY_AUTO_INIT. These are the module's first
tests, so it applies the Kotlin plugin and gets an API dump.
The sample has no system test left, so it comes off the system-test
runner and drops the Kotlin plugin it only needed for the test.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Merge the audit fixes from the branches below, and check the exception type in agentless mode
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(opentelemetry): [Sample Tests 36] Add an end-to-end test of the OTLP event linking (#6328)
* test(opentelemetry): Add an end-to-end test of the OTLP event linking
OtlpEndToEndTest captures a message, a log and a metric inside an
OpenTelemetry span with OpenTelemetryOtlpEventProcessor installed, and
checks what reaches MockSentryServer: the event carries the span's trace
and span IDs, and the log and the metric arrive. It ports the
OTLP-specific part of the console OTLP sample's system test, which never
checked the link. The sample's other assertions are the console
sample's, which SentryEndToEndTest covers.
The sample has no system test left, so it comes off the system-test
runner and the backend workflow, whose base row moves to the Spring
Boot 4 OTLP sample, and drops the Kotlin plugin it only needed for the
test.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(spring-boot): [Sample Tests 37] Move the Boot 4 OTLP sample's tests into the module (#6329)
* test(spring-boot): Move the Boot 4 OTLP sample's tests into the module
Adds an integrationTestOtlp suite to sentry-spring-boot-4: the servlet
app with the OpenTelemetry Spring Boot starter, set up by
sentry-opentelemetry-otlp-spring, and OpenTelemetryOtlpEventProcessor.
It ports the sample's tests, which were the servlet suite's without
OkHttp, and keeps the log and metric attribute checks the sample had
dropped.
The sample's transactions came from Sentry's own tracing, which CI
enabled with SENTRY_TRACES_SAMPLE_RATE, so the suite sets the sample
rate the same way. A new test checks what OTLP mode is for: an error in
a request carries the request's OpenTelemetry trace. Events point at
that trace rather than at Sentry's transaction, so the GraphQL errors
are checked next to their transactions instead of by trace ID, as the
sample did.
The sample has no system tests left, so it comes off the system-test
runner. It was the backend workflow's last sample, so the workflow goes
too. The Spring Boot 4 matrix runs the new suite.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Merge the audit fixes from the branches below, and port them to the Boot 4 OTLP suite
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test: [Sample Tests 38] Remove the system-test runner and its Python mock server (#6330)
* test: Remove the system-test runner and its Python mock server
Every sample's system test now lives in the module it tests, so the
Python runner, its mock Sentry server, requirements.txt and the Makefile
targets that ran them have nothing left to run.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test: [Sample Tests 39] Remove the io.sentry.systemtest plugin and sentry-system-test-support (#6331)
* test: Remove the io.sentry.systemtest plugin and sentry-system-test-support
With the runner gone, nothing applies the io.sentry.systemtest
convention plugin or depends on sentry-system-test-support, which held
the HTTP and GraphQL clients and the TestHelper the system tests used.
The envelope matchers it delegated to stay in sentry-test-support.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* docs: [Sample Tests 40] Describe the in-module end-to-end tests instead of the system tests (#6332)
* docs: Describe the in-module end-to-end tests instead of the system tests
The e2e_tests rule now covers MockSentryServer, where each kind of
end-to-end test lives, the Spring suites per flavor, the OpenTelemetry
agent fixture, how to run them and the gotchas the migration found. The
test skill runs integration suites by their source set instead of the
Python runner, the new_module rule no longer asks for sample tests, and
AGENTS.md drops sentry-system-test-support.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* Merge the audit fixes from the branches below, and document the test client and log4j2 suite
The context's TestRestTemplate adds trace headers of its own whenever
Sentry customizes the RestTemplateBuilder, not only in OpenTelemetry
mode, and the Spring Boot modules have an integrationTestLog4j2 suite.
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>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent d859296 commit fdcd080
85 files changed
Lines changed: 1851 additions & 3807 deletions
File tree
- .claude/skills/test
- .cursor/rules
- .github/workflows
- build-logic/src/main/kotlin
- io/sentry/gradle
- sentry-async-profiler
- src/test/java/io/sentry/asyncprofiler
- sentry-jul
- src/test
- kotlin/io/sentry/jul
- resources
- sentry-kafka
- src/test/kotlin/io/sentry/kafka
- sentry-log4j2
- src/test
- kotlin/io/sentry/log4j2
- resources
- sentry-opentelemetry
- sentry-opentelemetry-agentless
- api
- src/test/kotlin/io/sentry/opentelemetry/agentless
- sentry-opentelemetry-otlp
- src/test/kotlin
- sentry-samples
- sentry-samples-console-opentelemetry-noagent
- src/test/kotlin/sentry
- systemtest
- sentry-samples-console-otlp
- src/test/kotlin/io/sentry
- systemtest
- sentry-samples-console
- src/test/kotlin/io/sentry
- systemtest
- sentry-samples-jul
- src/test/kotlin/io/sentry
- systemtest
- sentry-samples-log4j2
- src/test/kotlin/io/sentry
- systemtest
- sentry-samples-spring-boot-4-otlp
- src/test
- kotlin/io/sentry
- systemtest
- resources
- sentry-spring-boot-4
- src/integrationTestOtlp
- kotlin/io/sentry/spring/boot4/otlpintegrationtest
- resources
- graphql
- sentry-system-test-support
- src/main
- graphql
- kotlin/io/sentry/systemtest
- graphql
- util
- sentry-test-support/src/main/kotlin/io/sentry/test
- sentry/src/test/java/io/sentry
- 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 | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
34 | | - | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 67 | + | |
71 | 68 | | |
72 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
73 | 72 | | |
74 | | - | |
75 | 73 | | |
76 | | - | |
| 74 | + | |
77 | 75 | | |
78 | 76 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 77 | + | |
83 | 78 | | |
84 | 79 | | |
85 | | - | |
86 | | - | |
| 80 | + | |
87 | 81 | | |
88 | 82 | | |
89 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | | - | |
| 12 | + | |
11 | 13 | | |
12 | | - | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
23 | 30 | | |
24 | | - | |
| 31 | + | |
25 | 32 | | |
26 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
27 | 48 | | |
28 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
| 112 | + | |
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
| |||
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
161 | | - | |
| 160 | + | |
162 | 161 | | |
163 | 162 | | |
164 | 163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | 49 | | |
64 | 50 | | |
65 | 51 | | |
This file was deleted.
0 commit comments