-
Notifications
You must be signed in to change notification settings - Fork 897
/
versioning-and-stability.md
376 lines (275 loc) · 19 KB
/
versioning-and-stability.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
# Versioning and stability for OpenTelemetry clients
**Status**: [Stable](document-status.md)
<details>
<summary>Table of Contents</summary>
<!-- toc -->
- [Design goals](#design-goals)
- [Signal lifecycle](#signal-lifecycle)
* [Experimental](#experimental)
* [Stable](#stable)
+ [API Stability](#api-stability)
- [Extending Existing API Calls](#extending-existing-api-calls)
+ [SDK Stability](#sdk-stability)
+ [Contrib Stability](#contrib-stability)
+ [Semantic Conventions Stability](#semantic-conventions-stability)
+ [Telemetry Stability](#telemetry-stability)
* [Deprecated](#deprecated)
* [Removed](#removed)
* [A note on replacing signals](#a-note-on-replacing-signals)
- [Version numbers](#version-numbers)
* [Major version bump](#major-version-bump)
* [Minor version bump](#minor-version-bump)
* [Patch version bump](#patch-version-bump)
* [Language version support](#language-version-support)
- [Long Term Support](#long-term-support)
* [API support](#api-support)
* [SDK Support](#sdk-support)
* [Contrib Support](#contrib-support)
- [OpenTelemetry GA](#opentelemetry-ga)
<!-- tocstop -->
</details>
This document defines the stability guarantees offered by the OpenTelemetry clients, along with the rules and procedures for meeting those guarantees.
In this document, the terms "OpenTelemetry" and "language implementations" both specifically refer to the OpenTelemetry clients.
These terms do not refer to the specification or the Collector in this document.
Each language implementation MUST take these versioning and stability requirements, and produce a language-specific document which details how these requirements will be met.
This document SHALL be placed in the root of each repo and named `VERSIONING`.
## Design goals
Versioning and stability procedures are designed to meet the following goals.
**Ensure that application owners stay up to date with the latest release of the SDK.**
We want all users to stay up to date with the latest version of the OpenTelemetry SDK.
We do not want to create hard breaks in support, of any kind, which leave users stranded on older versions.
It MUST always be possible to upgrade to the latest minor version of the OpenTelemetry SDK, without creating compilation or runtime errors.
**Never create a dependency conflict between packages which rely on different versions of OpenTelemetry. Avoid breaking all stable public APIs.**
Backwards compatibility is a strict requirement.
Instrumentation APIs cannot create a version conflict, ever. Otherwise, the OpenTelemetry API cannot be embedded in widely shared libraries, such as web frameworks.
Code written against older versions of the API MUST work with all newer versions of the API.
Transitive dependencies of the API cannot create a version conflict. The OpenTelemetry API cannot depend on a particular package if there is any chance that any library or application may require a different, incompatible version of that package.
A library that imports the OpenTelemetry API should never become incompatible with other libraries due to a version conflict in one of OpenTelemetry's dependencies.
Theoretically, APIs can be deprecated and eventually removed, but this is a process measured in years and we have no plans to do so.
**Allow for multiple levels of package stability within the same release of an OpenTelemetry component.**
Provide maintainers a clear process for developing new, experimental [signals](glossary.md#signals) alongside stable signals.
Different packages within the same release may have different levels of stability.
This means that an implementation wishing to release stable tracing today MUST ensure that experimental metrics are factored out in such a way that breaking changes to metrics API do not destabilize the trace API packages.
## Signal lifecycle
The development of each signal follows a lifecycle: experimental, stable, deprecated, removed.
The infographic below shows an example of the lifecycle of an API component.
![API Lifecycle](../internal/img/api-lifecycle.png)
### Experimental
Signals start as **experimental**, which covers alpha, beta, and release candidate versions of the signal.
While signals are experimental, breaking changes and performance issues MAY occur.
Components SHOULD NOT be expected to be feature-complete.
In some cases, the experiment MAY be discarded and removed entirely.
Long-term dependencies SHOULD NOT be taken against experimental signals.
OpenTelemetry clients MUST be designed in a manner that allows experimental signals to be created without breaking the stability guarantees of existing signals.
OpenTelemetry clients MUST NOT be designed in a manner that breaks existing users when a signal transitions from experimental to stable. This would punish users of the release candidate, and hinder adoption.
Terms which denote stability, such as "experimental," MUST NOT be used as part of a directory or import name.
Package **version numbers** MAY include a suffix, such as -alpha, -beta, -rc, or -experimental, to differentiate stable and experimental packages.
### Stable
Once an experimental signal has gone through rigorous beta testing, it MAY transition to **stable**.
Long-term dependencies MAY now be taken against this signal.
All signal components MAY become stable together, or MAY transition to stability component-by-component. The API MUST become stable before the other components.
Once a signal component is marked as stable, the following rules MUST apply until the end of that signal’s existence.
#### API Stability
Backward-incompatible changes to API packages MUST NOT be made unless the major version number is incremented.
All existing API calls MUST continue to compile and function against all future minor versions of the same major version.
Languages which ship binary artifacts SHOULD offer [ABI compatibility](glossary.md#abi-compatibility) for API packages.
##### Extending Existing API Calls
An existing API call MAY be extended without incrementing the major version
number if the particular language allows to do it in a backward-compatible
manner.
To add a new parameter to an existing API call depending on the language several
approaches are possible:
- Add a new optional parameter to existing methods. This may not be the right
approach for languages where ABI stability is part of our guarantees since it
likely breaks the ABI.
- Add a method overload that allows passing a different set of parameters, that
include the new parameter. This is likely the preferred approach for languages
where method overloads are possible.
There may be other ways to extend existing APIs in non-breaking manner. Language
maintainers SHOULD choose the idiomatic way for their language.
#### SDK Stability
Public portions of SDK packages MUST remain backwards compatible.
There are two categories of public features: **plugin interfaces** and **constructors**.
Examples of plugins include the SpanProcessor, Exporter, and Sampler interfaces.
Examples of constructors include configuration objects, environment variables, and SDK builders.
Languages which ship binary artifacts SHOULD offer [ABI compatibility](glossary.md#abi-compatibility) for SDK packages.
#### Contrib Stability
Plugins, instrumentation, and other contrib packages SHOULD be kept up to date
and compatible with the latest versions of the API, SDK, and Semantic
Conventions. If a release of the API, SDK, or Semantic Conventions contains
changes which are relevant to a contrib package, that package SHOULD be updated
and released in a timely fashion. (See limitations on instrumentation stability
in [Telemetry Stability](telemetry-stability.md).) The goal is to ensure users can
update to the latest version of OpenTelemetry, and not be held back by the
plugins that they depend on.
Public portions of contrib packages (constructors, configuration, interfaces) SHOULD remain backwards compatible.
Languages which ship binary artifacts SHOULD offer [ABI compatibility](glossary.md#abi-compatibility) for contrib packages.
**Exception:** Contrib packages MAY break stability when a required downstream dependency breaks stability.
For example, a database integration may break stability if the required database client breaks stability.
However, it is strongly RECOMMENDED that older contrib packages remain stable.
A new, incompatible version of an integration SHOULD be released as a separate contrib package, rather than break the existing contrib package.
#### Semantic Conventions Stability
Changes to telemetry produced by OpenTelemetry instrumentation SHOULD avoid
breaking analysis tools, such as dashboards and alerts. To achieve this, while
allowing the evolution of telemetry and semantic conventions, OpenTelemetry
relies on the concept of
[Telemetry Schemas](schemas/README.md).
Semantic Conventions defines breaking changes as those that would break the
"API" of tooling written against the telemetry it produces. That is the portions
of telemetry where specialized tooling (alerts, dashboards, e.g.) interact are
expected to remain stable for that tooling. Semantic Conventions defines the
set of fields to which stability concerns apply are as follows:
- [Resource](resource/sdk.md)
- attribute keys provided to Create or resource detectors
- [Trace](trace/api.md)
- Attribute keys provided to [get a tracer](trace/api.md#get-a-tracer)
- The following data provided to [span](trace/api.md#span) by available APIs:
- The span name
- The span kind
- The attribute keys provided to the span
- Whether these attributes must be provided at span start time, due to
sampling concerns.
- The following data provided when [adding an event](trace/api.md#add-events)
- The event name
- The attribute keys provided for the event
- [Metrics](metrics/api.md)
- Attribute keys provided to [get a meter](metrics/api.md#get-a-meter)
- The following arguments when constructing [an instrument](metrics/api.md#instrument):
- The name of the instrument
- The kind of instrument
- For `Counter` and `UpDownCounter` instruments, it is
acceptable to change between asynchronous and synchronous instruments.
- the unit of the instrument.
- The attribute keys provided when recording a measurement, for
both synchronous and asynchronous instruments.
- [Log Records](logs/bridge-api.md#logrecord)
- The attribute keys provided on the LogRecord
- [Log Events](logs/event-api.md)
- The following data provided to [emit event](logs/event-api.md#emit-event):
- The event name
- The components of [LogRecord](logs/bridge-api.md#logrecord) also
listed here.
Things not listed in the above are not enforced via semantic convention and are allowed (or expected) to change. A few examples:
- The values of attributes
- Specifically for `enums` the list of allowed values is expected to change
overtime.
- Event for `enums` that limit allowed values to semconv, some may need to
updated values in the future.
- The links attached to a span
- The recorded measurement type (float or integer) of a metric is not enforced and allowed to change.
- The description of a metric instrument.
- The values being recorded by an instrument.
The list of telemetry fields with enforced stability MAY be appended.
Changes to semantic conventions in this specification are allowed, provided that
the changes can be described by schema files. The following changes can be
currently described and are allowed:
- Renaming of span, metric, log and resource attributes.
- Renaming of metrics.
- Renaming of span events.
All such changes MUST be described in the OpenTelemetry
[Schema File Format](schemas/file_format_v1.1.0.md) and published in this repository.
For details see [how OpenTelemetry Schemas are published](schemas/README.md#opentelemetry-schema).
See the [Telemetry Stability](telemetry-stability.md) document for details on how
instrumentations can use schemas to change the instrumentation they produce.
In addition to the 3 types of changes described above there are certain types
that are always allowed. Such changes do not need to be described (and are not
described) by schema files. Here is the list of such changes:
- Adding new attributes to the existing semantic conventions for resources,
spans, span events or log records.
- Adding new attributes to existing metrics that do not create new timeseries.
- Adding semantic conventions for new types of resources, spans, span events,
metrics or log records.
Any other changes to semantic conventions are currently prohibited. Other types
of changes MAY be introduced in the future versions of this specification. This
is only allowed if OpenTelemetry introduces a new schema file format that is
capable of describing such changes.
#### Telemetry Stability
For stability of telemetry produced by instrumentation see the
[Telemetry Stability](telemetry-stability.md) document.
### Deprecated
Signals MAY eventually be replaced. When this happens, they are marked as deprecated.
Signals SHALL only be marked as deprecated when the replacement becomes stable.
Deprecated code MUST abide by the same support guarantees as stable code.
### Removed
Support is ended by the removal of a signal from the release.
The release MUST make a major version bump when this happens.
### A note on replacing signals
Note that we currently have no plans for creating a major version of OpenTelemetry past v1.0.
For clarity, it is still possible to create new, backwards incompatible versions of existing signals without actually moving to v2.0 and breaking support.
For example, imagine we develop a new, better tracing API - let's call it AwesomeTrace.
We will never mutate the current tracing API into AwesomeTrace.
Instead, AwesomeTrace would be added as an entirely new signal which coexists and interoperates with the current tracing signal.
This would make adding AwesomeTrace a minor version bump, *not* v2.0.
v2.0 would mark the end of support for current tracing, not the addition of AwesomeTrace.
And we don't want to ever end that support, if we can help it.
This is not actually a theoretical example.
OpenTelemetry already supports two tracing APIs: OpenTelemetry and OpenTracing.
We invented a new tracing API, but continue to support the old one.
## Version numbers
OpenTelemetry clients follow [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html), with the following clarifications.
OpenTelemetry clients have four components: API, SDK, Semantic Conventions, and Contrib.
For the purposes of versioning, all code within a component MUST treated as if it were part of a single package, and versioned with the same version number,
except for Contrib, which may be a collection of packages versioned separately.
* All stable API packages MUST version together, across all signals.
Stable signals MUST NOT have separate version numbers.
There is one version number that applies to all signals that are included in the API release that is labeled with that particular version number.
* SDK packages for all signals MUST version together, across all signals.
Signals MUST NOT have separate version numbers.
There is one version number that applies to all signals that are included in the SDK release that is labeled with that particular version number.
* Semantic Conventions are a single package with a single version number.
* Each contrib package MAY have it's own version number.
* The API, SDK, Semantic Conventions, and contrib components have independent version numbers.
For example, the latest version of `opentelemetry-python-api` MAY be at v1.2.3 while the latest version of `opentelemetry-python-sdk` is at v2.3.1.
* Different language implementations have independent version numbers.
For example, it is fine to have `opentelemetry-python-api` at v1.2.8 when `opentelemetry-java-api` is at v1.3.2.
* Language implementations have version numbers which are independent of the specification they implement.
For example, it is fine for v1.8.2 of `opentelemetry-python-api` to implement v1.1.1 of the specification.
**Exception:** in some languages, package managers may react poorly to experimental packages having a version higher than 0.X.
In these cases, experimental signals MAY version independently from stable signals, in order to retain a 0.X version number.
When a signal becomes stable, the version MUST be bumped to match the other stable signals in the release.
### Major version bump
Major version bumps MUST occur when there is a breaking change to a stable interface or a deprecated signal is removed.
Major version bumps SHOULD NOT occur for changes which do not result in a drop in support of some form.
### Minor version bump
Most changes to OpenTelemetry clients result in a minor version bump.
* New backward-compatible functionality added to any component.
* Breaking changes to internal SDK components.
* Breaking changes to experimental signals.
* New experimental signals are added.
* Experimental signals become stable.
* Stable signals are deprecated.
### Patch version bump
Patch versions make no changes which would require recompilation or potentially break application code.
The following are examples of patch fixes.
* Bug fixes which don't require minor version bump per rules above.
* Security fixes.
* Documentation.
Currently, the OpenTelemetry project does NOT have plans to backport bug and security fixes to prior minor versions of the SDK.
Security and bug fixes MAY only be applied to the latest minor version.
We are committed to making it feasible for end users to stay up to date with the latest version of the OpenTelemetry SDK.
### Language version support
Each language implementation SHOULD define
how the removal of a supported language/runtime version
affects its versioning.
As a rule of thumb,
it SHOULD follow the conventions in the given ecosystem.
## Long Term Support
![long term support](../internal/img/long-term-support.png)
### API support
Major versions of the API MUST be supported for a minimum of **three years** after the release of the next major API version.
API support is defined as follows.
* API stability, as defined above, MUST be maintained.
* A version of the SDK which supports the latest minor version of the last major version of the API will continue to be maintained during LTS.
Bug and security fixes MUST be backported. Additional feature development is NOT RECOMMENDED.
* Contrib packages available when the API is versioned MUST continue to be maintained for the duration of LTS.
Bug and security fixes will be backported.
Additional feature development is NOT RECOMMENDED.
### SDK Support
SDK stability, as defined above, will be maintained for a minimum of **one year** after the release of the next major SDK version.
### Contrib Support
Contrib stability, as defined above, will be maintained for a minimum of **one year** after the release of the next major version of a contrib package.
## OpenTelemetry GA
The term “OpenTelemetry GA” refers to the point at which OpenTracing and OpenCensus will be fully deprecated.
The **minimum requirements** for declaring GA are as followed.
* A stable version of both tracing and metrics MUST be released in at least four languages.
* CI/CD, performance, and integration tests MUST be implemented for these languages.