@@ -31,3 +31,47 @@ Not all of our artifacts are published as stable artifacts - any non-stable arti
3131` -alpha ` on its version. NONE of the guarantees described above apply to alpha artifacts. They may
3232require code or environment changes on every release and are not meant for consumption for users
3333where versioning stability is important.
34+
35+ ## Dropping support for older library versions
36+
37+ ### Library instrumentation
38+
39+ Bumping the minimum supported library version for library instrumentation is generally acceptable
40+ if there's a good reason because:
41+
42+ * Users of library instrumentation have to integrate the library instrumentation during build-time
43+ of their application, and so have the option to bump the library version if they are using an
44+ unsupported library version.
45+ * Users have the option of staying with the old version of library instrumentation, without being
46+ pinned on an old version of the OpenTelemetry API and SDK.
47+ * Bumping the minimum library version changes the artifact name, so it is not technically a breaking
48+ change.
49+
50+ ### Javaagent instrumentation
51+
52+ The situation is much trickier for javaagent instrumentation:
53+
54+ * A common use case of the javaagent is applying instrumentation at deployment-time (including
55+ to third-party applications), where bumping the library version is frequently not an option.
56+ * While users have the option of staying with the old version of javaagent, that pins them on
57+ an old version of the OpenTelemetry API and SDK, which is problematic for the OpenTelemetry
58+ ecosystem.
59+ * While bumping the minimum library version changes the instrumentation module name, it does not
60+ change the "aggregated" javaagent artifact name which most users depend on, so could be considered
61+ a breaking change for some users (though this is not a breaking change that we currently make any
62+ guarantees about).
63+
64+ For these reasons, bumping the minimum supported library version for a javaagent instrumentation
65+ requires more scrutiny and must be considered on a case-by-case basis.
66+
67+ When there is functionality in a new library version that requires changes to the javaagent
68+ instrumentation which are incompatible with the current javaagent base library version, some options
69+ that do not require bumping the minimum supported library version include:
70+
71+ * Access the new functionality via reflection. This is a good technique only for very small changes.
72+ * Create a new javaagent instrumentation module to support the new library version. This requires
73+ configuring non-overlapping versions in the muzzle check and applying ` assertInverse ` to confirm
74+ that the two instrumentations are never be applied to the same library version (see
75+ [ class loader matchers] ( https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/docs/contributing/writing-instrumentation-module.md#restrict-the-criteria-for-applying-the-instrumentation-by-extending-the-classloadermatcher-method )
76+ for how to restrict instrumentations to specific library versions). If there's too much copy-paste
77+ between the two javaagent instrumentation modules, a ` -common ` module can be extracted.
0 commit comments