Debian Codegraph @

VERSIONING.md

raw
1 # Versioning and stability
2
3 The OpenTelemetry Collector SIG produces several artifacts for [a variety of audiences](CONTRIBUTING.md#target-audiences). This document describes the versioning and support policy for these artifacts. These policies are designed so that the following goal can be achieved:
4
5 **Users are provided software artifacts of value that are stable and secure.**
6
7 The policies are divided depending on the artifact's target audience. While an artifact is supported, [critical bugs](docs/release.md#bugfix-release-criteria) and security vulnerabilities MUST be addressed. The main criteria for the length of support for an artifact is how easy it is for an artifact's target audience to adapt to disruptive changes.
8
9 These policies reflect the current consensus of the OpenTelemetry Collector SIG. They are subject to change as the project evolves.
10
11 ## Software artifacts for end users
12
13 Software artifacts intended for [end users](CONTRIBUTING.md#end-users) of the OpenTelemetry Collector include
14 - Binary distributions of the OpenTelemetry Collector.
15 - Go modules that expose Collector components, such as receivers, processors, connectors, extensions and exporters.
16
17 These artifacts are versioned according to the [semantic versioning v2.0.0](https://semver.org/) specification.
18
19 ### General considerations
20
21 Binary distributions produced by the Collector SIG contain components and features with varying [levels of stability](README.md#stability-levels). We abide by the following principles to relate the Collector's version to the stability of its components and features:
22
23 * The Collector's core framework behavior MUST be stable in order for a Collector distribution to be v1.0.0 or higher.
24 * Users can easily understand when they are opting in to use a component or feature that is not stable.
25 * The Collector MUST be configurable so that unstable components or features can be excluded ensuring that a fully stable configuration is possible.
26 * The Collector's telemetry (e.g. Collector logs) MUST provide the ability to identify usage of unstable components or features.
27
28 ### Long-term support after v1
29
30 The OpenTelemetry Collector SIG provides long-term support for stable binary distributions of the OpenTelemetry Collector and its components. The following policies apply to long-term support for any major version starting on v1:
31
32 * A binary distribution of the OpenTelemetry Collector MUST be supported for a minimum of **one year** after the release of the next major version of said distribution.
33 * Components MUST be supported for a minimum of **6 months** after the release of the next major version of said component or after the component has been marked as deprecated. If a component has been deprecated for 6 months it MAY be removed from a binary distribution of the OpenTelemetry Collector. This does not imply a major version change in the Collector distribution.
34
35 ## Go modules
36
37 Go modules are intended to be used by [component developers](CONTRIBUTING.md#component-developers) and [Collector library users](CONTRIBUTING.md#collector-library-users) of the OpenTelemetry Collector
38
39 Unless otherwise specified, the following public API expectations apply to all modules in opentelemetry-collector and opentelemetry-collector-contrib.
40 As a general rule, stability guarantees of modules versioned as `v1` or higher are aligned with [Go 1 compatibility promise](https://go.dev/doc/go1compat).
41
42 ### General Go API considerations
43
44 OpenTelemetry authors reserve the right to introduce API changes breaking compatibility between minor versions in the following scenarios:
45 * **Struct literals.** It may be necessary to add new fields to exported structs in the API. Code that uses unkeyed
46 struct literals (such as pkg.T{3, "x"}) to create values of these types would fail to compile after such a change.
47 However, code that uses keyed literals (pkg.T{A: 3, B: "x"}) will continue to compile. We therefore recommend
48 using OpenTelemetry collector structs with the keyed literals only.
49 * **Methods.** As with struct fields, it may be necessary to add methods to types. Under some circumstances,
50 such as when the type is embedded in a struct along with another type, the addition of the new method may
51 break the struct by creating a conflict with an existing method of the other embedded type. We cannot protect
52 against this rare case and do not guarantee compatibility in such scenarios.
53 * **Dot imports.** If a program imports a package using `import .`, additional names defined in the imported package
54 in future releases may conflict with other names defined in the program. We do not recommend the use of
55 `import .` with OpenTelemetry Collector modules.
56
57 Unless otherwise specified in the documentation, the following may change in any way between minor versions:
58 * **String representation**. The `String` or `Error` method of any struct is intended to be human-readable and may
59 change its output in any way.
60 * **Go version compatibility**. Removing support for an unsupported Go version is not considered a breaking change.
61 * **OS version compatibility**. Removing support for an unsupported OS version is not considered a breaking change. Upgrading or downgrading OS version support per the [platform support](docs/platform-support.md) document is not considered a breaking change.
62 * **Protocol compatibility**. Changing the default minimum version of a supported protocol (e.g. TLS) or dropping support for protocols when there are security concerns is not considered a breaking change.
63 * **Dependency updates**. Updating dependencies is not considered a breaking change except when their types are part of the
64 public API or the update may change the behavior of applications in an incompatible way.
65 * **Underlying type for interfaces**. If a struct exported as an interface has an experimental
66 method, this method may change or be removed in a minor version. The method will be published in an
67 optional interface under an experimental module to signal it is experimental.
68
69 ### Configuration structures
70
71 Configuration structures are part of the public API and backwards
72 compatibility should be maintained through any changes made to configuration structures.
73
74 Unless otherwise specified in the documentation, the following may change in any way between minor versions:
75 * **Adding new fields to configuration structures**. Because configuration structures are typically instantiated through
76 unmarshalling a serialized representation of the structure, and not through structure literals, additive changes to
77 the set of exported fields in a configuration structure are not considered to break backward compatibility.
78 * **Relaxing validation rules**. An invalid configuration struct as defined by its `Validate` method return value
79 may become valid after a change to the validation rules.
80
81 The following are explicitly considered to be breaking changes:
82 * **Modifying struct tags related to serialization**. Struct tags used to configure serialization mechanisms (`yaml:`,
83 `mapstructure:`, etc) are part of the structure definition and must maintain compatibility to the same extent as the
84 structure. However, changes are allowed when tag modifications produce a
85 functionally-equivalent result when serializing or deserializing the structure.
86 For example, adding a tag to a field so it will not be emitted during serialization
87 if it has a default value would not alter its value if the serialized representation
88 were again deserialized, so such a change would be permitted.
89 * **Making validation rules more strict**. A valid configuration struct as defined by its `Validate` method return value
90 must continue to be valid after a change to the validation rules, except when the configuration struct would cause an error
91 on its intended usage (e.g. when calling a method or when passed to any method or function in any module under opentelemetry-collector).
92
93 ### Module versioning and schema
94
95 * Versioning of this project will be idiomatic of a Go project using [Go
96 modules](https://golang.org/ref/mod#versions).
97 * [Semantic import
98 versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning)
99 will be used.
100 * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html).
101 * If a module is version `v2` or higher, the major version of the module
102 must be included as a `/vN` at the end of the module paths used in
103 `go.mod` files (e.g., `module go.opentelemetry.io/collector/v2`, `require
104 go.opentelemetry.io/collector/v2 v2.0.1`) and in the package import path
105 (e.g., `import "go.opentelemetry.io/collector/v2/component"`). This includes the
106 paths used in `go get` commands (e.g., `go get
107 go.opentelemetry.io/collector/[email protected]`. Note there is both a `/v2` and a
108 `@v2.0.1` in that example. One way to think about it is that the module
109 name now includes the `/v2`, so include `/v2` whenever you are using the
110 module name).
111 * If a module is version `v0` or `v1`, do not include the major version in
112 either the module path or the import path.
113 * Semantic convention packages will contain a complete version identifier in their
114 import path to enable concurrent use of multiple convention versions in a single
115 application. This identifies the version of the specification used to generate
116 the package and is not related to the version of the module containing the package.
117 * A single module should exist, rooted at the top level of this repository,
118 that contains all packages provided for use outside this repository.
119 * Additional modules may be created in this repository to provide for
120 isolation of build-time tools, other commands or independent libraries. Such modules should be
121 versioned in sync with the `go.opentelemetry.io/collector` module.
122 * Experimental modules still under active development will be versioned with a major
123 version of `v0` to imply the stability guarantee defined by
124 [semver](https://semver.org/spec/v2.0.0.html#spec-item-4).
125
126 > Major version zero (0.y.z) is for initial development. Anything MAY
127 > change at any time. The public API SHOULD NOT be considered stable.
128 * Versioning of the associated [contrib
129 repository](https://github.com/open-telemetry/opentelemetry-collector-contrib) of
130 this project will be idiomatic of a Go project using [Go
131 modules](https://golang.org/ref/mod#versions).
132 * [Semantic import
133 versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning)
134 will be used.
135 * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html).
136 * If a module is version `v2` or higher, the
137 major version of the module must be included as a `/vN` at the end of the
138 module paths used in `go.mod` files (e.g., `module
139 github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sprocessor/v2`, `require
140 github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sprocessor/v2 v2.0.1`) and in the
141 package import path (e.g., `import
142 "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sprocessor/v2"`). This includes
143 the paths used in `go get` commands (e.g., `go get
144 github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sprocessor/[email protected]`. Note there
145 is both a `/v2` and a `@v2.0.1` in that example. One way to think about
146 it is that the module name now includes the `/v2`, so include `/v2`
147 whenever you are using the module name).
148 * If a module is version `v0` or `v1`, do not include the major version
149 in either the module path or the import path.
150 * Modules will be used to encapsulate receivers, processors, exporters,
151 extensions, connectors and any other independent sets of related components.
152 * Experimental modules still under active development will be versioned with a major
153 version of `v0` to imply the stability guarantee defined by
154 [semver](https://semver.org/spec/v2.0.0.html#spec-item-4).
155
156 > Major version zero (0.y.z) is for initial development. Anything MAY
157 > change at any time. The public API SHOULD NOT be considered stable.
158
159 * Experimental modules will start their versioning at `v0.0.0` and will
160 increment their minor version when backwards incompatible changes are
161 released and increment their patch version when backwards compatible
162 changes are released.
163 * Mature modules for which we guarantee a stable public API will
164 be versioned with a major version of `v1` or greater.
165 * All stable contrib modules of the same major version with this project
166 will use the same entire version.
167 * Stable modules may be released with an incremented minor or patch
168 version even though that module's code has not been changed. Instead
169 the only change that will have been included is to have updated that
170 modules dependency on this project's stable APIs.
171 * Contrib modules will be kept up to date with this project's releases.
172 * GitHub releases will be made for all releases.
173 * Go modules will be made available at Go package mirrors.
174
175 ### Long-term support after v1
176
177 The OpenTelemetry Collector SIG provides long-term support for stable Go modules. Support for modules depend on the module's [target audiences](CONTRIBUTING.md#target-audiences). The following policies apply to long-term support for any major version starting on v1:
178
179 - Modules intended for **component developers** MUST be supported for a minimum of **1 year** after the release of the next major version of said module or after the module has been marked as deprecated.
180 - Modules intended for **Collector library users** MUST be supported for a minimum of **6 months** after the release of the next major version of said module or after the module has been marked as deprecated.