-
Notifications
You must be signed in to change notification settings - Fork 910
7181: Loading Compressor using ClassLoader configured through setServiceClassLoader #7428
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
7181: Loading Compressor using ClassLoader configured through setServiceClassLoader #7428
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7428 +/- ##
============================================
+ Coverage 89.75% 89.78% +0.02%
- Complexity 6980 6998 +18
============================================
Files 797 798 +1
Lines 21165 21204 +39
Branches 2057 2058 +1
============================================
+ Hits 18996 19037 +41
+ Misses 1505 1503 -2
Partials 664 664 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| requireNonNull(compressionMethod, "compressionMethod"); | ||
| Compressor compressor = CompressorUtil.validateAndResolveCompressor(compressionMethod); | ||
| Compressor compressor = | ||
| CompressorUtil.validateAndResolveCompressor(compressionMethod, serviceClassLoader); |
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.
Seems like we should move the call to CompressorUtil.validateAndResolveCompressor down to HttpExporterBuilder, GrpcExporterBuilder to avoid the clutter of keeping ClassLoader serviceClassLoader property.
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.
Thanks for reviewing this. I agree with you and I am making the changes. Let me get back after wrap them up.
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.
@jack-berg Let me know how the current version looks.
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.
Just one recommendation to declutter, but looks good. Thanks for working on this.
See also #7446 - after seeing this PR I realized that adding this logic still wouldn't allow autoconfigure users to be able to specify the class loader used to load the compressor. With this and #7446 we have a good holistic story.
…porters as per feedback
Context
This PR aims to resolve ClassLoader issue from this bug ticket.