-
Notifications
You must be signed in to change notification settings - Fork 870
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
Spring boot service name #8006
Spring boot service name #8006
Conversation
Add mdc baggage
…a/io/opentelemetry/javaagent/instrumentation/logback/mdc/v1_0/LogbackSingletons.java Co-authored-by: Mateusz Rzeszutek <[email protected]>
…trumentation into main
@adamleantech currently this pr also contains your logback baggage changes |
669cbcf
to
cd32a9b
Compare
cd32a9b
to
5f07328
Compare
@laurit yeah, i wanted to leave it in draft until rebasing the merge of the baggage changes, should be good now |
Closing and reopening to trigger checks |
@Nullable | ||
private String findByBootInfApplicationYml() { | ||
String result = | ||
loadFromBootInf("application.yml", SpringBootServiceNameDetector::parseNameFromYaml); |
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 like you've found a bug in the findByClasspath*()
methods - they both should in fact be loading files from the BOOT-INF/classes
directory. Can you fix these two instead of adding this new method?
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.
To me this looks wrong. @adamleantech why do yo need to explicitly mention BOOT-INF/classes
, spring boot class loader automatically handles finding stuff from BOOT-INF/classes
you shouldn't need to add it to resource path.
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.
the java agent executes this code before the spring boot app has had chance to do this
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.
@mateuszrzeszutek I found the existing functionality useful when testing the agent against spring boot apps in my IDE where the code has not been assembled into a JAR and therefore the resources are in the usual classpath resource location. Maybe findByClasspath*() should be updated to look in both places?
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.
@adamleantech Thanks, I have added tests and fixed BOOT-INF/classes
handling in #8101. Could you review and see if this would work for your use case. If it does you could remove BOOT-INF/classes
related code from this PR and only leave handling multiple yaml.
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.
Hey @adamleantech I just merged #8101; can you merge/rebase your PR with main
?
thanks @adamleantech! |
resolves #7998