-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add agent instrumentation for Ratpack 1.7 #12572
base: main
Are you sure you want to change the base?
Conversation
cdbef3f
to
9e0c64a
Compare
These tests run locally and the test error seems to be occurring in any PR that is triggering a run of the test partitions (see https://github.com/open-telemetry/opentelemetry-java-instrumentation/actions/runs/11629696246/job/32387158964?pr=12553) and not loading from cache. Not sure what to do with this since it doesn't appear to be related to this change. |
@laurit Thanks, can you send which test fails for you and which gradle command you are running?
Can you explain why you think I should do that? I would expect in a ratpack 1.7 application, that the 1.4 instrumentation is there and it's critical for passing along the OTEL context information through ratpack's async model. |
0a9215b
to
b70e529
Compare
It fails for me. Try running
Our tests are set up so that we test with the earliest version, which is also the version in the module name, and with the latest version |
This adds instrumentation that only works starting in ratpack 1.6 because of methods that were introduced to allow HttpClient interception. All the server side instrumentation from 1.4 works fine in later versions. All this change really does is add ratpack level instrumentation for http client calls instead of netty level (which causes supression).
Yeah, this all passes for me. I'm running with OpenJDK Termurin 17. |
I checked and (btw a couple of the latest CI failures outside of the ratpack module are due to #12579 which will get cleared up if you rebase) |
Figured this out - I had disabled the shadow relocation so I could debug the instrumentation. Reenabling it causes the failure. I'll find some time to work out the issues. |
So I suspect the issue is that in the test class, I'm not working with the shaded versions of some of these classes - https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12572/files#diff-0a231ce184aa699e90d480be72001173b246f78a2104827ae473df46f9a6595dR37 Any suggestions on the idiomatic way to do this? In an actual Ratpack app, the ExecInitializer gets bound into the server's registry when it's built, but in these tests, we're using the Ratpack |
4a71280
to
6e420d4
Compare
Got this all working now and the tests pass. I had to change a bit of the instrumentation to make it work consistently with with |
26e1bf3
to
093aeaa
Compare
Implements agent based instrumentation for ratpack 1.7 including http client instrumentation.