From d6b4c60d7a60b95e02feee9446fc5786d9b54d79 Mon Sep 17 00:00:00 2001 From: Om Yarewar Date: Thu, 7 May 2026 17:50:05 +0000 Subject: [PATCH] Add Sphinx docs for opentelemetry.sdk.util package The sdk.util package exposes BoundedList, BoundedDict, ns_to_iso_str, and get_dict_as_key but none of them appeared in the generated Sphinx docs. Only the instrumentation submodule had a page (util.instrumentation.rst), and it was incorrectly nested under the trace toctree. - Add docs/sdk/util.rst with automodule directive for opentelemetry.sdk.util - Move util.instrumentation toctree entry from trace.rst to util.rst - Add util to the SDK docs index Fixes #2573 Assisted-by: Claude Opus 4.6 Signed-off-by: Om Yarewar --- CHANGELOG.md | 1 + docs/sdk/index.rst | 1 + docs/sdk/trace.rst | 1 - docs/sdk/util.rst | 14 ++++++++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 docs/sdk/util.rst diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bcb9ba07a..faf208865b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 > We are working on stabilizing the Log signal that would require making deprecations and breaking changes. We will try to reduce the releases that may require an update to your code, especially for instrumentations or for sdk developers. ## Unreleased +- `opentelemetry-sdk`: Add Sphinx documentation for `opentelemetry.sdk.util` package (`BoundedList`, `BoundedDict`, `ns_to_iso_str`, `get_dict_as_key`), move `util.instrumentation` toctree entry from `trace` to `util` ([#2573](https://github.com/open-telemetry/opentelemetry-python/issues/2573)) - Switch to SPDX license headers and add CI enforcement ([#5177](https://github.com/open-telemetry/opentelemetry-python/pull/5177)) diff --git a/docs/sdk/index.rst b/docs/sdk/index.rst index ecc4a39085..6cf8f98348 100644 --- a/docs/sdk/index.rst +++ b/docs/sdk/index.rst @@ -20,3 +20,4 @@ processed, and exported. metrics error_handler environment_variables + util diff --git a/docs/sdk/trace.rst b/docs/sdk/trace.rst index d163ac11e2..141c858f48 100644 --- a/docs/sdk/trace.rst +++ b/docs/sdk/trace.rst @@ -9,7 +9,6 @@ Submodules trace.export trace.id_generator trace.sampling - util.instrumentation .. automodule:: opentelemetry.sdk.trace :members: diff --git a/docs/sdk/util.rst b/docs/sdk/util.rst new file mode 100644 index 0000000000..ab2f6554b9 --- /dev/null +++ b/docs/sdk/util.rst @@ -0,0 +1,14 @@ +opentelemetry.sdk.util package +============================== + +Submodules +---------- + +.. toctree:: + + util.instrumentation + +.. automodule:: opentelemetry.sdk.util + :members: + :undoc-members: + :show-inheritance: