-
Notifications
You must be signed in to change notification settings - Fork 873
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
Change convention for encoding version into package name #932
Comments
I don't have a strong preference for either proactively adding the version or keep it the first version of an instrumentation unversioned and adding the suffix for newer ones (without changing the old one) when it's necessary. I guess it's trade-off of consistency in our codebase vs somewhat ugly import statements for users - I guess the latter could be considered better UX at the cost of some cognitive load on the maintainers. |
I don't like it but it seems to be the necessary trade-off. If encode versions into package name, then we could as well do it from the beginning. |
I think it's worth re-confirming this decision for library instrumentation in light of our more recent decision to only support a single min version for library instrumentations, and to bump that min version as needed. Encoding the package name for library instrumentation means that we can break the API as needed when updating to a newer library version, which could be useful if the underlying instrumented library has breaking changes that affect us. But it also means that we probably will break with core repo policy of continuing to publish stable artifacts until the next major version, e.g. if we bumped from xyzlib-2.0 to xyzlib-3.0, we would not continue to publish xyzlib-2.0, but this would require not encoding the min version in the library instrumentation artifact name either. |
One more reason to encode the supported library version in the package name would be the Java Module System -- as in, it would break if 2 different jars (
On the other hand, we're not really breaking anything for |
Part of #932 I wanted to get this done before starting the spring boot starter v3 work.
Another part of #932 In this PR I changed all the library instrumentation packages -- these are breaking changes, so I figured the earlier we do this the less painful it'll be to the users. I know that at least some of them are actively used, so we'll need to spell this out in the release notes. --------- Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
Closing, I think this is done. |
reopening to fix remaining occurrences and to add a CI check |
Currently we only encode the version into the package name when there is more than one version, e.g.
but we don't encode the version if there is only one version, e.g.
The idea was that the package names weren't public, so we could change them later if/when we needed a second version.
With the introduction of library instrumentation now, these package names are public, so i think makes sense to change our convention and always encode the version into the package name (for both library and auto instrumentation package names, to keep them similar).
EDIT: this way, if we need to support a new version later, we don't have to add the version to the old package name at that time.
The text was updated successfully, but these errors were encountered: