Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Upgrade procedures for OpenTelemetry #147

Merged
merged 5 commits into from
Mar 15, 2021

Conversation

tedsuo
Copy link
Contributor

@tedsuo tedsuo commented Mar 5, 2021

This OTEP clarifies the stability requirements in the Versioning and Support document.

  • Clarify that the API interfaces are backwards compatible for callers which use them, not SDKs which implement them.
  • Clarify that the SDK plugin interfaces are backwards compatible for implementors.
  • Explanation as to why we need these requirements, and the problems that they solve.
  • Explanation as to how this design avoids the need to backport patches to older versions of the SDK, or maintain multiple versions of instrumentation.

A google doc version of this OTEP is available here, in case you find that format easier to comment on:
https://docs.google.com/document/d/1p_KDgfBo6_7kO7cvio4ZrcjsJqZqr3UyT00zimUI7qY/edit#

@tedsuo tedsuo requested a review from a team March 5, 2021 08:57

Plugin Interfaces refer to extension points provided by the SDK. These include interfaces for controlling sampling, exporting data, and various other lifecycle hooks. Note that these interfaces are not part of the API. They are part of the SDK.

Instrumentation refers to any code which calls the API. This includes the instrumentation provided by the OpenTelemetry project, third party instrumentation, plus application code and libraries which instrument themselves natively.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "Instrumentation refers to any code which calls the API to produce instrumentation signals". (albeit non-instrumentation usage of the API is limited to SDK or SDK replacements)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, in this doc I want to define the term Instrumentation to specify any caller of the API package, vs any implementor of the package interfaces. In other words, focus on the directionality of the dependency and not the use case. The relevant information for the reader is to understand that directionality, not the use case. I will try to make it super clear that the term "instrumentation" cover other random use cases as well, as far as this document is concerned.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess @jsuereth was saying "SDK is not an instrumentation" (although SDK calls the API)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsuereth want to follow up on this when I add it to the spec?

text/0000-upgrade-procedures Outdated Show resolved Hide resolved

The primary blocker to upgrading the SDK is out of date Plugins. If a new version of the SDK were to break existing Plugin Interfaces, no user would be able to upgrade their SDK until the Plugins they depend on have been upgraded. Users could be caught between instrumentation they depend on requiring a version of the API which is not compatible with the version of the SDK which supports their Plugins.

By following a deprecation pattern with Plugin Interfaces, we create a one year window in which the Plugin ecosystem can upgrade after the release of a new SDK. We believe this is sufficient time for any Plugin which is actively maintained to make an upgrade, and for defunct Plugins to be identified and replaced.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been thinking a lot about this here, and I want to through out an idea i've been noodling on.

  1. Keep this 1-year plugin interface deprecation policy for most SDK plugin interfaces.
  2. To alleviate concerns around 1-year timeline we provide a longer timeline on the Collector
  • We keep a 3-year compatibility guarantee on OTLP exporter to collector
  • We provide longer stability guarantees of "plugins API"s through the Collector

This is a non blocking comment, and just a thought I've had when reading this. I think what you've written represents a balance of "what we can do" and "what users will want". However, I know from "build plugin" space that 1-year can actually be "fast" for some old and highly used (but unchanged) plugins. I'm not sure that'll be true in our space but want to call out the parallel. Build plugins likely are more akin to instrumentation, but I still worry 1 year will be too short for the edge case scenarios we'll see people solve.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would be @tigrannajaryan/@bogdandrutu/collector-maintainers decision.

In general, I think we can support most deprecated plugin interfaces indefinitely, and the window is actually much wider. But I' prefer not to officially make such a long timeline a rule, as there may be edge cases where a Plugin Interface is being changed in order to support a change in the underlying framework architecture, and maintaining the old plugin interface is actually very burdensome.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would view this as a floor applied across the entire project. If individual SIGs wanted to provide longer compatibility guarantees then I wouldn't see this as necessarily precluding them from doing so.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this document was exclusively about language APIs and SDKs. Do we need a separate doc, or at least a section, for the collector?

I think of the collector as having only plugin interfaces, no APIs. Also, since the collector is written in a single language (Go), we can be a lot more specific about the meaning of compatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@punya correct this document is just about the OpenTelemetry clients. In my opinion the Collector should have the same minimal guarantee (One year support for deprecated plugin interfaces), but I agree that there should be a stability and support document written which is specific to the Collector.


Bugs fixes, security patches, and performance improvements are released as patch versions of the SDK. Support for new versions of the API are released as minor versions. New Plugin Interfaces and configuration options are also released as minor versions.

Breaking changes to Plugin Interfaces are handled through deprecation. Instead of breaking a Plugin Interface, a new interface is created and the existing interface is marked as deprecated. Plugins which target the deprecated interface continue to work, and the SDK provides default implementations of any missing functionality. After one year, the deprecated Plugin Interface is removed as a major version release of the SDK.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some languages adding the new element to the existing interface along with a default implementation will probably be a better fit. cc @jkwatson

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's truly a breaking change, then a new interface would need to be provided. But, the old interface should still be supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally. Some languages are more flexible than others, so its not the case that every language will experience deprecation at the same rate. The intent is to only apply these rules for situations where a deprecation would lead to a breaking change to plugin implementations.

@jkwatson
Copy link
Contributor

jkwatson commented Mar 5, 2021

Minor nit...if this were a .md file, then github would let us read the formatted version, which would be very much preferable to having to scroll to the right in the window so much.

@tedsuo
Copy link
Contributor Author

tedsuo commented Mar 10, 2021

Hi all! I believe I have addressed all concerns. @open-telemetry/technical-committee please review and approve.

@carlosalberto
Copy link
Contributor

Merging as we have 4 reviews (and no changes requested). @tedsuo let's follow an issue in the Specification to get this integrated there, etc.

@carlosalberto carlosalberto merged commit 518917a into open-telemetry:main Mar 15, 2021
carlosalberto pushed a commit to carlosalberto/oteps that referenced this pull request Oct 23, 2024
carlosalberto pushed a commit to carlosalberto/oteps that referenced this pull request Oct 23, 2024
carlosalberto pushed a commit to carlosalberto/oteps that referenced this pull request Oct 30, 2024
carlosalberto pushed a commit to open-telemetry/opentelemetry-specification that referenced this pull request Nov 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants