Add instrumentation for quarkus-rest-client-reactive (MicroProfile REST Client 3.0+)#11495
Draft
dougqh wants to merge 1 commit into
Draft
Add instrumentation for quarkus-rest-client-reactive (MicroProfile REST Client 3.0+)#11495dougqh wants to merge 1 commit into
dougqh wants to merge 1 commit into
Conversation
…VM, MicroProfile REST Client 3.0+) Intercepts RestClientBuilder.build(Class<?>) to register a ClientRequestFilter that starts an HTTP client span and injects Datadog + W3C propagation headers on every outbound REST call. Fixes trace disconnection seen when quarkus-rest-client-reactive is used in multi-service Quarkus stacks (APMS-19675 / APMS-19646). Scope: MicroProfile REST Client 3.0+ (jakarta namespace, Quarkus 3.x JVM mode). A separate module targeting MicroProfile REST Client 2.x (javax namespace, Quarkus 2.x) can follow the same pattern. GraalVM native support requires companion build-time configuration. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4 tasks
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master resultsStartup Time
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
quarkus-rest-client-reactive-3.0that interceptsRestClientBuilder.build(Class<?>)and registers aClientRequestFilterto automatically inject Datadog and W3C trace propagation headers on every outbound REST callquarkus-rest-client-reactivein multi-service Quarkus stacksImplementation
The hook is
RestClientBuilder.build(Class<?>)— the single point where all MicroProfile REST clients are finalized. Before the proxy is built,QuarkusRestClientTracingFilter.classis registered on the builder viaForTypeHierarchyadvice. That filter fires on every outbound request to start an HTTP client span (component: quarkus-rest-client-reactive) and finish it on response.CXF/SOAP propagation already works in the same Quarkus binary because CXF routes through
HttpURLConnection, which we instrument at the connection level.quarkus-rest-client-reactive(RESTEasy Reactive → Vert.x HTTP Client) does not cross that instrumented path, hence the gap this PR closes.Scope / known limitations
jakarta.*imports forjavax.*Test plan
QuarkusRestClientInstrumentationTest— 2 JUnit 5 tests using RESTEasy MicroProfile client + JDK HttpServer): verifyx-datadog-trace-id/x-datadog-parent-idheaders are injected and a span is created per request./gradlew :dd-java-agent:instrumentation:quarkus:quarkus-rest-client-reactive-3.0:testpasses locallymicroprofile-rest-client-api ≥ 3.0dd-smoke-tests/quarkusrecommended before mergeLabels
comp:java-tracer,inst:quarkus,type:feature,tag:ai generated🤖 Generated with Claude Code