-
Notifications
You must be signed in to change notification settings - Fork 896
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
Provide Java 9 Module names to all instrumentation projects #9124
Comments
hi @rjbaucells! this sounds good, can you review open-telemetry/opentelemetry-java#781 and propose something similar in this repo? |
Sure, I can do a similar PR in this repo. Now, what should be the module naming convention?
|
this looks good to me 👍 |
we might want to include the "base version" as well, since we include that in the artifact and package names, so that we can change the supported base version in the future without introducing breaking changes |
The module name should not contain version, it should follow same guidelines as package name and must be the same from version to version. Two modules cannot export the same package name (JVM will not load the application). |
we use "base version" to refer to the lowest version of the instrumented library that the instrumenation supports, e.g. Line 6 in 23213fd
this "base version" is also encoded in the artifact name, e.g. there's also some more context in #932 (comment) |
Adding specific examples:
Could share the same module name I can add the same naming convention as the package name... but I think it will bring more problems in the future. Changing a dependency version requires the update of the |
The "base version" is not the version of the instrumentation library; it's the minimum supported version of the instrumented library, and we normally encode it as part of the package/artifact name precisely to avoid conflicts. I strongly think that the |
OK, I will use the same convention as in the package name. |
Resolved with #9140 |
Modern Java applications (JDK 9+) should use modules for encapsulation and easy dependency management. The first step libraries should take (without breaking compatibility with old JDK versions) is providing a module name in the
META-INF\MANIFEST.MF
file. The level of effort is low and will remove unnecessary warning messages in applications consuming it. e.g.:Using the
MANIFEST.MF
Automatic-Module-Name
header will remove the above warning from consumer applications: e.g.:OpenTelemetry API and SDK already provide this configuration in the
MANIFEST.MF
files.I can provide
PR
for adding such names once the naming convention is agreed upon.The text was updated successfully, but these errors were encountered: