-
Notifications
You must be signed in to change notification settings - Fork 867
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
Make spring boot service name detector handle BOOT-INF/classes #8101
Make spring boot service name detector handle BOOT-INF/classes #8101
Conversation
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.
Looks good to me!
SpringBootServiceNameDetector guesser = new SpringBootServiceNameDetector(); | ||
Resource result = guesser.createResource(config); |
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.
SpringBootServiceNameDetector guesser = new SpringBootServiceNameDetector(); | |
Resource result = guesser.createResource(config); | |
SpringBootServiceNameDetector detector = new SpringBootServiceNameDetector(); | |
Resource result = detector.createResource(config); |
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.
This is copy pasted from
Lines 49 to 50 in 195fd38
SpringBootServiceNameDetector guesser = new SpringBootServiceNameDetector(system); | |
Resource result = guesser.createResource(config); |
WDYT about renaming this in both tests after this is merged?
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.
Oh sure. I think guesser
was in the original name probably. No biggie.
private final boolean addBootInfPrefix; | ||
|
||
SystemHelper() { | ||
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); |
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.
Is getting the context CL necessary? This class runs in SDK setup time; in the javaagent it shouldn't have any context CL set (I've removed the setContextClassLoader
calls a while ago)
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.
There isn't anything that says this has to be used only with javaagent. I think the context class loader defaults to system when it is not set (not set to null or some other class loader by the user).
When spring boot application is packaged in one jar
application.properties
andapplication.yml
are underBOOT-INF/classes/
.