-
Notifications
You must be signed in to change notification settings - Fork 791
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
Support testing library/agent instrumentation interoperability #4771
Support testing library/agent instrumentation interoperability #4771
Conversation
56408fa
to
b083079
Compare
b083079
to
e24eb12
Compare
@trask Thanks for looking at this :) By the way, the idea I had in mind to remove this snippet and make things hopefully more robust is a custom |
This sounds cool, though I'll probably leave this part for the gradle magicians ✨ I think I've about worked out what should / should not be on the class path in order to enable writing tests that verify interoperability between agent and library instrumentation (see also #4779). |
…nt-instrumentation-interop
CI still hasn't passed yet, but I'm feeling good about this next run, so optimistically marking it ready for review 😂 |
if (lib.startsWith(instrumentationDir) && | ||
lib.extension == "jar" && | ||
!lib.absolutePath.substring(instrumentationDir.absolutePath.length).contains("testing")) { | ||
if (lib.name.startsWith("opentelemetry-javaagent-")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If lib
is an absoluteFile
, how can it start with opentelemetry-javaagent
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's lib.name
, e.g. File.getName()
, not the full path
…telemetry#4771) * Support testing library/agent instrumentation interoperability * Exclude autoconfigure modules also * Not just any autoconfigure
I don't think the removed code is needed anymore since the library instrumentation is shaded inside of the agent even during tests now. But let's see what CI says...
Removing this code will allow agent tests to be written that use the library instrumentation and verify interoperability between the two.