Skip to content

Migrate Spring Boot RabbitMQ smoke test to JUnit - #12128

Open
PerfectSlayer wants to merge 1 commit into
bbujon/smoke-tests-opentelemetryfrom
bbujon/smoke-tests-spring-boot-rabbit
Open

Migrate Spring Boot RabbitMQ smoke test to JUnit#12128
PerfectSlayer wants to merge 1 commit into
bbujon/smoke-tests-opentelemetryfrom
bbujon/smoke-tests-spring-boot-rabbit

Conversation

@PerfectSlayer

@PerfectSlayerPerfectSlayer commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

What Does This Do

This PR migrates the Spring Boot RabbitMQ smoke tests to the new JUnit smoke test framework.

Motivation

The new tests checks the whole trace structures and span values, in addition to trace payload validity and invariants.
It also check that three round-trips are present (no only one) and the trace is fully-connected.

Additional Notes

Contributor Checklist

Jira ticket: APMLP-1247

@PerfectSlayerPerfectSlayer added type: feature Enhancements and improvements tag: no release notes Changes to exclude from release notes labels Aug 3, 2026
@PerfectSlayer
PerfectSlayer requested a review from a team as a code ownerAugust 3, 2026 13:52
@PerfectSlayerPerfectSlayer added the inst: rabbitmq RabbitMQ instrumentation label Aug 3, 2026
@PerfectSlayer
PerfectSlayer requested review from vandonr and removed request for a teamAugust 3, 2026 13:52
@PerfectSlayerPerfectSlayer added the inst: spring Spring instrumentation label Aug 3, 2026

@datadog-datadog-us1-proddatadog-datadog-us1-prodBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: FAIL

The migrated test changes RabbitMQ's known teardown-error allowlist from the actual client text occured to occurred. When either app is stopped, that disconnect log is treated as an unexpected error and the smoke test fails in teardown; restore the original spelling.

Open Bits AI session

🤖 Datadog Autotest · Commit 1201890 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@chatgpt-codex-connectorchatgpt-codex-connectorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit:1201890609

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +138 to +140
return trace(
SORT_BY_ANCESTRY,
sp("spring-rabbit-0", "servlet.request", "GET /roundtrip/{message}").root(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Match received chunks instead of one cross-JVM trace

When a round trip crosses the sender and receiver JVMs, each tracer flushes its own trace chunk to the backend; TestAgentBackend.fetchTraces() only decodes /test/session/traces and does not coalesce chunks sharing a trace ID. Consequently, no received DecodedTrace contains all 12 spans required here, so this assertion times out even when propagation is correct. Match the per-JVM chunks separately and compare their trace/parent IDs, or explicitly merge chunks by trace ID before applying this matcher.

Useful? React with 👍 / 👎.

@dd-octo-sts

dd-octo-stsBot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

SuiteStatus
Startup🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
ScenarioCandidatemasterΔ (95% CI of mean)
startup:insecure-bank:iast:Agent14.73 s14.71 s[-0.9%; +1.1%] (no difference)
startup:insecure-bank:tracing:Agent13.49 s13.70 s[-2.4%; -0.6%] (maybe better)
startup:petclinic:appsec:Agent17.58 s17.43 s[+0.0%; +1.7%] (maybe worse)
startup:petclinic:iast:Agent17.56 s17.61 s[-1.4%; +0.8%] (no difference)
startup:petclinic:profiling:Agent17.56 s17.15 s[+1.1%; +3.7%] (significantly worse)
startup:petclinic:sca:Agent17.48 s17.17 s[+0.9%; +2.8%] (maybe worse)
startup:petclinic:tracing:Agent16.70 s16.37 s[-2.5%; +6.4%] (no difference)

Commit:2f155a28 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@PerfectSlayer
PerfectSlayer requested review from a team as code ownersAugust 4, 2026 11:30
@PerfectSlayer
PerfectSlayer requested review from mcculls and removed request for a teamAugust 4, 2026 11:30
@PerfectSlayer
PerfectSlayerforce-pushed the bbujon/smoke-tests-spring-boot-rabbit branch from 1201890 to 979b3f4CompareAugust 5, 2026 05:28
@datadog-datadog-us1-prod

This comment has been minimized.

@PerfectSlayer
PerfectSlayerforce-pushed the bbujon/smoke-tests-spring-boot-rabbit branch from 979b3f4 to 353ea51CompareAugust 5, 2026 15:48
@PerfectSlayer
PerfectSlayerforce-pushed the bbujon/smoke-tests-spring-boot-rabbit branch 2 times, most recently from 3b1d4ed to bb468daCompareAugust 6, 2026 11:47
@PerfectSlayer
PerfectSlayerforce-pushed the bbujon/smoke-tests-spring-boot-rabbit branch from bb468da to 2cb3514CompareAugust 7, 2026 08:13
@PerfectSlayer
PerfectSlayerforce-pushed the bbujon/smoke-tests-spring-boot-rabbit branch from 2cb3514 to 3053afcCompareAugust 11, 2026 09:55
@PerfectSlayerPerfectSlayer removed the tag: no release notes Changes to exclude from release notes label Aug 12, 2026
@PerfectSlayerPerfectSlayer added the tag: no release notes Changes to exclude from release notes label Aug 12, 2026
@PerfectSlayer
PerfectSlayerforce-pushed the bbujon/smoke-tests-spring-boot-rabbit branch from 3053afc to 4d018c9CompareAugust 13, 2026 12:33
void roundTripsProduceFullAmqpTraceStructure() throws IOException {
// Drive 3 round-trips through the sender; each travels
// sender -> otherqueue -> receiver -> queue -> sender.
String[] MESSAGES = {"foo", "bar", "baz"};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nit for MESSAGES to be lowercase since it's a local variable, but not a big deal

@sarahchen6sarahchen6 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice the new test covers much more 👍

return trace(sp(service, "amqp.command", command).root());
}

private static SpanMatcher sp(String service, String operation, String resource) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe spm would be a bit better name?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or simply a method local span method (eventually using a qualified SpanMatcher.span())

@bric3bric3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, a few tidbits though.

return trace(sp(service, "amqp.command", command).root());
}

private static SpanMatcher sp(String service, String operation, String resource) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or simply a method local span method (eventually using a qualified SpanMatcher.span())

class SpringBootRabbitSmokeTest {
private static final int TIMEOUT_SECONDS = 60;
private static final int RABBIT_AMQP_PORT = 5672;
private static final OkHttpClient CLIENT = new OkHttpClient();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Is there a reason to make this static rather than an instance variable ?

@PerfectSlayer
PerfectSlayerforce-pushed the bbujon/smoke-tests-spring-boot-rabbit branch from 4d018c9 to 2f155a2CompareAugust 20, 2026 16:15
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

inst: rabbitmqRabbitMQ instrumentationinst: springSpring instrumentationtag: no release notesChanges to exclude from release notestype: featureEnhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@PerfectSlayer@bric3@sarahchen6@AlexeyKuznetsov-DD