Skip to content

Experimental API in stable modules #11586

@dmitryax

Description

@dmitryax

Given that we have a resolution of open-telemetry/opentelemetry-specification#4257 for OTel libraries, this issue is intended to make a decision on how to approach the same problem in OTel Collector.

We have a few 1.x modules in the collector that we need to keep working on and adding features. It isn't always possible to add those features as stable from day 1. Even if it potentially can be possible to move those features to different 0.x modules, there are several problems associated with this approach:

  1. There has to be complexity overhead to maintain keep them in a separate module;
  2. Once stabilized, they must be moved back, which will be an unnecessary breaking change for users who opt-in to try an experimental feature.

A particular example is the new entity data type. Potentially, it could be possible to start introducing it the same way it was done for profiling. But there is one important difference: the new entity signal also introduces a new field to stable resource message, which is reflected in the stable pdata/pcommon module, see new method in https://github.com/open-telemetry/opentelemetry-collector/pull/11282/files#diff-20c7903a84235f237b5170d75351abbd6c2bb7069aff946e369a01c6e36022cf. That field will reference an experimental field in the stable resource protobuf message. If we use pdatagen as is, this will be added as an extra method to the Resource struct, but that method has to be marked as experimental in a 1.x module. It may be possible to move that method to another experimental module as a function, but it's significantly more complicated and not intuitive API compared to other auto-generated pdata API. As mentioned before, this will also have to be moved back to the Resource struct once it's stabilized, which is another breaking change.

The suggestion is to introduce the same rule for the Collector as decided for OTel libraries in open-telemetry/opentelemetry-specification#4270 and allow having experimental APIs in stable modules.

Looking for feedback from @open-telemetry/collector-approvers.

cc @tigrannajaryan

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions