-
Notifications
You must be signed in to change notification settings - Fork 888
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
Versioning and Stability for OpenTelemetry #1291
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
73a96eb
Versioning and support based on OTEP 143
tedsuo a36b18d
Add high level architecture to overview
tedsuo f84976a
Add signals and user roles to glossary
tedsuo 1c122f3
avoid duplicate headers
tedsuo b68b637
clarify relationship between version numbers
tedsuo 5fa51fa
spelling
tedsuo 08fba57
clarify API and contrib packages
tedsuo 2046ed9
Change required component order for stability
tedsuo 6ea2be3
clarify contrib packages
tedsuo f6c6c32
clarify sdk public interfaces
tedsuo d1e260e
Add constructor and SDK plugin to the glossary
tedsuo 87e362a
spelling
tedsuo 45fb639
add examples of signals
tedsuo cca55d0
Simplify the wording of the ABI recomendation
tedsuo 25f1b47
clarify that these are documents, not proposals
tedsuo 83163b8
clarify that contrib packages may break when downstream is instable
tedsuo bc5dfc0
clarify that new packages should be created, rather than breaking old…
tedsuo 1f9f5aa
lint
tedsuo 4a5f5f7
remove MD filetype from VERSIONING document description
tedsuo afc39ca
replace vague termilology with more specific laguage
tedsuo d50eb58
clarify definition of contrib packages
tedsuo aa6a7ed
clarify contrib stability
tedsuo c95156e
clarify major version bumps
tedsuo 121cea4
spelling/grammar
tedsuo 9df95ff
update overview TOC
tedsuo 86e8601
replace "language library" with "OpenTelemetry Client"
tedsuo 6c83986
spelling
tedsuo 64fdaa7
OTLP is real now
tedsuo edef5a8
language libraries -> OpenTelemetry Clients
tedsuo a1e802c
update library guidelines
tedsuo 2242b3e
must -> may
tedsuo d361df9
grammar
tedsuo d1c8dd7
link to glossary
tedsuo ad4b7e6
semantics are for more than cloud computing
tedsuo df10850
Add formatting and glossary links
tedsuo cb4a86a
telemetry stability is not defined
tedsuo 3d5f516
Define ABI compatibility
tedsuo 379066f
merge sections on sematic conventions
tedsuo 8d0b4a4
SDK clarification
tedsuo 21ab3ae
grammamatical fixes
tedsuo 71cc619
clarify that ABI conpatibility is optional
tedsuo ef740b8
remove stability for conventions
tedsuo 751db94
consolidate and clarify lifecycle stages
tedsuo bc75340
remove reference to a unified API
tedsuo ffa321f
cleaning up, final small text changes
tedsuo 3d06f37
Add to versioning to the ToC
tedsuo ec5b8cc
Update changelog
tedsuo bb808c7
Merge branch 'master' into versioning
carlosalberto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,52 +1,53 @@ | ||||||
# OpenTelemetry Language Library Design Principles | ||||||
# OpenTelemetry Client Design Principles | ||||||
|
||||||
This document defines common principles that will help designers create language libraries that are easy to use, are uniform across all supported languages, yet allow enough flexibility for language-specific expressiveness. | ||||||
This document defines common principles that will help designers create OpenTelemetry clients that are easy to use, are uniform across all supported languages, yet allow enough flexibility for language-specific expressiveness. | ||||||
|
||||||
The language libraries are expected to provide full features out of the box and allow for innovation and experimentation through extensibility points. | ||||||
OpenTelemetry clients are expected to provide full features out of the box and allow for innovation and experimentation through extensibility. | ||||||
|
||||||
The document does not attempt to describe a language library API. For API specs see [specification](../README.md). | ||||||
Please read the [overview](overview.md) first, to understand the fundamental architecture of OpenTelemetry. | ||||||
|
||||||
_Note to Language Library Authors:_ OpenTelemetry specification, API and SDK implementation guidelines are work in progress. If you notice incomplete or missing information, contradictions, inconsistent styling and other defects please let specification writers know by creating an issue in this repository or posting in [Gitter](https://gitter.im/open-telemetry/opentelemetry-specification). As implementors of the specification you will often have valuable insights into how the specification can be improved. The Specification SIG and members of Technical Committee highly value your opinion and welcome your feedback. | ||||||
This document does not attempt to describe the details or functionality of the OpenTelemetry client API. For API specs see the [API specifications](../README.md). | ||||||
|
||||||
_Note to OpenTelemetry client Authors:_ OpenTelemetry specification, API and SDK implementation guidelines are work in progress. If you notice incomplete or missing information, contradictions, inconsistent styling and other defects please let specification writers know by creating an issue in this repository or posting in [Gitter](https://gitter.im/open-telemetry/opentelemetry-specification). As implementors of the specification you will often have valuable insights into how the specification can be improved. The Specification SIG and members of Technical Committee highly value your opinion and welcome your feedback. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
## Requirements | ||||||
|
||||||
1. The OpenTelemetry API must be well-defined and clearly decoupled from the implementation. This allows end users to consume API only without also consuming the implementation (see points 2 and 3 for why it is important). | ||||||
|
||||||
2. Third party libraries and frameworks that add instrumentation to their code will have a dependency only on the API of OpenTelemetry language library. The developers of third party libraries and frameworks do not care (and cannot know) what specific implementation of OpenTelemetry is used in the final application. | ||||||
2. Third party libraries and frameworks that add instrumentation to their code will have a dependency only on the API of OpenTelemetry client. The developers of third party libraries and frameworks do not care (and cannot know) what specific implementation of OpenTelemetry is used in the final application. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
3. The developers of the final application normally decide how to configure OpenTelemetry SDK and what extensions to use. They should be also free to choose to not use any OpenTelemetry implementation at all, even though the application and/or its libraries are already instrumented. The rationale is that third-party libraries and frameworks which are instrumented with OpenTelemetry must still be fully usable in the applications which do not want to use OpenTelemetry (so this removes the need for framework developers to have "instrumented" and "non-instrumented" versions of their framework). | ||||||
|
||||||
4. The SDK must be clearly separated into wire protocol-independent parts that implement common logic (e.g. batching, tag enrichment by process information, etc.) and protocol-dependent telemetry exporters. Telemetry exporters must contain minimal functionality, thus enabling vendors to easily add support for their specific protocol. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
5. The SDK implementation should include the following exporters: | ||||||
- OTLP. | ||||||
- Jaeger. | ||||||
- Zipkin. | ||||||
- Prometheus. | ||||||
- OpenTelemetry Protocol (when the protocol is specified and approved). | ||||||
- Standard output (or logging) to use for debugging and testing as well as an input for the various log proxy tools. | ||||||
- In-memory (mock) exporter that accumulates telemetry data in the local memory and allows to inspect it (useful for e.g. unit tests). | ||||||
|
||||||
Note: some of these support multiple protocols (e.g. gRPC, Thrift, etc). The exact list of protocols to implement in the exporters is TBD. | ||||||
|
||||||
Other vendor-specific exporters (exporters that implement vendor protocols) should not be included in language libraries and should be placed elsewhere (the exact approach for storing and maintaining vendor-specific exporters will be defined in the future). | ||||||
Other vendor-specific exporters (exporters that implement vendor protocols) should not be included in OpenTelemetry clients and should be placed elsewhere (the exact approach for storing and maintaining vendor-specific exporters will be defined in the future). | ||||||
|
||||||
## Language Library Generic Design | ||||||
## OpenTelemetry Client Generic Design | ||||||
|
||||||
Here is a generic design for a language library (arrows indicate calls): | ||||||
Here is a generic design for an OpenTelemetry client (arrows indicate calls): | ||||||
|
||||||
![Language Library Design Diagram](../internal/img/library-design.png) | ||||||
![OpenTelemetry client Design Diagram](../internal/img/library-design.png) | ||||||
|
||||||
### Expected Usage | ||||||
|
||||||
The OpenTelemetry Language Library is composed of 2 packages: API package and SDK package. | ||||||
In this specification, _package_ is used as a conceptual separation and does not prescribe the exact structure of the artifacts making up the language implementations. | ||||||
Whether the API and SDK packages are bundled as two all-in-one artifacts or split across multiple ones (e.g. one for api-trace, one for api-metric, one for sdk-trace, one for sdk-metric) is considered an implementation detail as long as the API artifact(s) stay separate from the SDK artifact(s). | ||||||
The OpenTelemetry client is composed of 4 types of [packages](glossary.md#packages): API packages, SDK packages, a Semantic Conventions package, and plugin packages. | ||||||
The API and the SDK are split into multiple packages, based on signal type (e.g. one for api-trace, one for api-metric, one for sdk-trace, one for sdk-metric) is considered an implementation detail as long as the API artifact(s) stay separate from the SDK artifact(s). | ||||||
|
||||||
Third-party libraries and frameworks that want to be instrumented in OpenTelemetry-compatible way will have a dependency on the API package. The developers of these third-party libraries will add calls to telemetry API to produce telemetry data. | ||||||
Libraries, frameworks, and applications that want to be instrumented with OpenTelemetry take a dependency only on the API packages. The developers of these third-party libraries will make calls to the API to produce telemetry data. | ||||||
|
||||||
Applications that use third-party libraries that are instrumented with OpenTelemetry API will have a choice to enable or not enable the actual delivery of telemetry data. The application can also call telemetry API directly to produce additional telemetry data. | ||||||
Applications that use third-party libraries that are instrumented with OpenTelemetry API control whether or not to install the SDK and generate telemetry data. When the SDK is not installed, the API calls should be no-ops which generate minimal overhead. | ||||||
|
||||||
In order to enable telemetry the application must take a dependency on the OpenTelemetry SDK, which implements the delivery of the telemetry. The application must also configure exporters so that the SDK knows where and how to deliver the telemetry. The details of how exporters are enabled and configured are language specific. | ||||||
In order to enable telemetry the application must take a dependency on the OpenTelemetry SDK. The application must also configure exporters and other plugins so that telemetry can be correctly generated and delivered to their analysis tool(s) of choice. The details of how plugins are enabled and configured are language specific. | ||||||
|
||||||
### API and Minimal Implementation | ||||||
|
||||||
|
@@ -102,21 +103,21 @@ The end-user application may decide to take a dependency on alternative implemen | |||||
|
||||||
SDK provides flexibility and extensibility that may be used by many implementations. Before developing an alternative implementation, please, review extensibility points provided by OpenTelemetry. | ||||||
|
||||||
An example use case for alternate implementations is automated testing. A mock implementation can be plugged in during automated tests. For example it can store all generated telemetry data in memory and provide a capability to inspect this stored data. This will allow the tests to verify that the telemetry is generated correctly. Language Library authors are encouraged to provide such mock implementation. | ||||||
An example use-case for alternate implementations is automated testing. A mock implementation can be plugged in during automated tests. For example, it can store all generated telemetry data in memory and provide a capability to inspect this stored data. This will allow the tests to verify that the telemetry is generated correctly. OpenTelemetry client authors are encouraged to provide such a mock implementation. | ||||||
|
||||||
Note that mocking is also possible by using SDK and a Mock `Exporter` without needed to swap out the entire SDK. | ||||||
Note that mocking is also possible by using SDK and a Mock `Exporter` without needing to swap out the entire SDK. | ||||||
|
||||||
The mocking approach chosen will depend on the testing goals and at which point exactly it is desirable to intercept the telemetry data path during the test. | ||||||
|
||||||
### Version Labeling | ||||||
|
||||||
API and SDK packages must use semantic version numbering. API package version number and SDK package version number are decoupled and can be different (and they both can be also different from the Specification version number that they implement). API and SDK packages MUST be labeled with their own version number. | ||||||
|
||||||
This decoupling of version numbers allows language library authors to make API and SDK package releases independently without the need to coordinate and match version numbers with the Specification. | ||||||
This decoupling of version numbers allows OpenTelemetry client authors to make API and SDK package releases independently without the need to coordinate and match version numbers with the Specification. | ||||||
|
||||||
Because API and SDK package version numbers are not coupled, every API and SDK package release MUST clearly mention the Specification version number that they implement. In addition, if a particular version of SDK package is only compatible with a specific version of API package, then this compatibility information must be also published by language library authors. Language library authors MUST include this information in the release notes. For example, the SDK package release notes may say: "SDK 0.3.4, use with API 0.1.0, implements OpenTelemetry Specification 0.1.0". | ||||||
Because API and SDK package version numbers are not coupled, every API and SDK package release MUST clearly mention the Specification version number that they implement. In addition, if a particular version of SDK package is only compatible with a specific version of API package, then this compatibility information must be also published by OpenTelemetry client authors. OpenTelemetry client authors MUST include this information in the release notes. For example, the SDK package release notes may say: "SDK 0.3.4, use with API 0.1.0, implements OpenTelemetry Specification 0.1.0". | ||||||
|
||||||
_TODO: How should third party library authors who use OpenTelemetry for instrumentation guide their end users to find the correct SDK package?_ | ||||||
_TODO: How should third-party library authors who use OpenTelemetry for instrumentation guide their end users to find the correct SDK package?_ | ||||||
|
||||||
### Performance and Blocking | ||||||
|
||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we discuss this renaming and make a decision on this? I am not against the change but it seems to me it is not a clear improvement over previous wording ("client" can be a confusing term).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, no group decision here. I began using the term "OpenTelemetry client" because "language library" wasn't clear - we have many libraries in each language, and none of these libraries contain a language. "Client" is a more common term for the set of components we are referring too. Open to other options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't been able to elicit much comment on this one. There's some preference for "OpenTelemetry client" over "language library" as it is a more standard term 🤷♀️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is "OpenTelemetry client" different from "OpenTelemetry SDK", which is what we generally use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yurishkuro OpenTelemetry client replaces "language library." It contains: API, SDK, SemConv, and Contrib.