Skip to content

Commit a6b85d2

Browse files
Add requirement to allow extending Stable APIs (#4270)
Resolves #4257 This issue has been discussed in spec SIG meeting on 22 Oct 2024 and decision was made that we want this to be a requirement for language implementations. This is a new requirement for implementations, which we believe becomes more and more important now that we have Stable signals that we would like to continue evolving.
1 parent ce097ec commit a6b85d2

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

Diff for: CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ release.
3333

3434
### Compatibility
3535

36+
- Add requirement to allow extending Stable APIs
37+
([#4270](https://github.com/open-telemetry/opentelemetry-specification/pull/4270))
38+
3639
### SDK Configuration
3740

3841
- Clarify declarative configuration parse requirements for null vs empty.

Diff for: specification/versioning-and-stability.md

+14-1
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,23 @@ the plugin interfaces MUST continue to be possible to use with newer versions of
142142
For languages that commonly share code via binary artifacts, e.g. Java, backwards-compatible means that end user's code that implements plugin interfaces MUST continue to be possible to use with newer minor or patch versions without recompiling the end user's code.
143143

144144
If this backwards compatible addition of methods to interfaces is not possible for a language,
145-
the language maintainers MAY still implement the addition using backwards-compatible workarounds without incrementing the major version.
145+
the language maintainers SHOULD still implement the addition using backwards-compatible
146+
workarounds without incrementing the major version.
146147
For example, a possible workaround might be to add a new interface instead of extending the existing one and accept the
147148
new interface in addition to the old one in every place.
148149

150+
Additionally, a Stable signal's API/SDK MAY be extended by adding new methods to existing
151+
Stable APIs. Language implementations SHOULD have a mechanism to do so, such that:
152+
153+
- Adding a new method in Development maturity level is possible and is not a breaking
154+
change for users that do not use the new method.
155+
- New in Development methods SHOULD require opt-in, so that the user is made aware of
156+
the risk associated with using the development API. It should be documented that
157+
the newly added methods are in Development and are subject to breaking changes.
158+
- Removing (or deprecating) a method that was in Development maturity level but did
159+
not graduate to Stable level is not a breaking change for users that never used the
160+
method.
161+
149162
There may be other ways to extend existing API/SDKs in non-breaking manner. Language
150163
maintainers SHOULD choose the idiomatic way for their language.
151164

0 commit comments

Comments
 (0)