Following the discussion in #1205 where we identified that the opentelemetry (i.e. the opentelemetry-api package) and (soon) the opentelemetry-sdkpackages are setup as Namespace Packages, we decided there was a need for guidelines which explain how subsequent extension packages should extend these base packages.
A Namespace Package allows other directories to extend the original namespace package by distributing packages under the same package name.
We already do this today with the instrumentation and exporter packages, which extend the OTel Python API package.
e.g. opentelemetry.instrumentation.* and opentelemetry.exporter.*
The guidelines should address how packages will extend the OTel Python SDK package and ensure that installing these extension packages don't disrupt the operation of the original package.
Regarding the proposal that OTel Python SDK package extensions should live under opentelemetry.sdk.extension, the following can be said:
Pros:
- Extra functionality for vendor specific tools under the OTel name means they should be easier to find by users
- This is consistent with the
instrumentation and exporter models we have today
- Encourages updates to OTel SDK to consider effects on SDK extensions which users will likely be using
Cons:
- Maintaining this code becomes the responsibility of the open source community
- Can still cause conflicts down the line as we as upstream cannot guarantee changing the directory structure in a way that breaks an unknown 3rd party package.
- 3rd party packages should use their own import paths
Inconsistent with other languages who have more complicated package importing
Following the discussion in #1205 where we identified that the
opentelemetry(i.e. the opentelemetry-api package) and (soon) theopentelemetry-sdkpackages are setup as Namespace Packages, we decided there was a need for guidelines which explain how subsequent extension packages should extend these base packages.A Namespace Package allows other directories to extend the original namespace package by distributing packages under the same package name.
We already do this today with the
instrumentationandexporterpackages, which extend the OTel Python API package.e.g.
opentelemetry.instrumentation.*andopentelemetry.exporter.*The guidelines should address how packages will extend the OTel Python SDK package and ensure that installing these extension packages don't disrupt the operation of the original package.
Regarding the proposal that OTel Python SDK package extensions should live under
opentelemetry.sdk.extension, the following can be said:Pros:
instrumentationandexportermodels we have todayCons:
Inconsistent with other languages who have more complicated package importing