Skip to content
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

Fix class file load error when using spring-guice together with sprin… #7447

Merged

Conversation

mateuszrzeszutek
Copy link
Member

…g-web instrumentation

Fixes #7428

@mateuszrzeszutek mateuszrzeszutek merged commit 8c64a9e into open-telemetry:main Jan 2, 2023
@mateuszrzeszutek mateuszrzeszutek deleted the fix-spring-guice branch January 2, 2023 10:01
mateuszrzeszutek pushed a commit that referenced this pull request Jan 2, 2023
In
#7447
injected resource is opened with class loader getResourceAsStream. This
works only in class loaders where getResourceAsStream delegates to
getResource. This is not the case with all class loaders, for example
tomcat class loader does not do this. Because of this we also need to
instrument class loader getResourceAsStream.
Comment on lines +35 to +38
// make the filter class file loadable by ClassPathResource - in some cases (e.g. spring-guice,
// see https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7428) Spring
// might want to read the class file metadata; this line will make the filter class file visible
// to the bean class loader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SpringWeb instrumentation conflicts with Spring-Guice library
3 participants