Skip to content

Add Sphinx docs for opentelemetry.sdk.util package#5186

Open
OmYarewar wants to merge 6 commits into
open-telemetry:mainfrom
OmYarewar:fix/add-sdk-util-docs
Open

Add Sphinx docs for opentelemetry.sdk.util package#5186
OmYarewar wants to merge 6 commits into
open-telemetry:mainfrom
OmYarewar:fix/add-sdk-util-docs

Conversation

@OmYarewar

Copy link
Copy Markdown

Description

Ran into this while looking through the SDK docs — the opentelemetry.sdk.util package has several public utilities (BoundedList, BoundedDict, ns_to_iso_str, get_dict_as_key) but none of them show up in the generated Sphinx documentation. Only the instrumentation submodule had a docs page, and it was sitting under the trace toctree which didn't feel right since it's actually part of sdk.util, not sdk.trace.

Changes:

  • Added docs/sdk/util.rst with an automodule directive for opentelemetry.sdk.util so BoundedList, BoundedDict, ns_to_iso_str, and get_dict_as_key all get documented
  • Moved the util.instrumentation toctree entry from trace.rst to util.rst where it actually belongs
  • Added util to the SDK docs index

Fixes #2573

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Verified RST structure matches the existing pattern used by metrics.rst, trace.rst, etc.
  • Confirmed util.rst follows the same automodule + toctree pattern as other SDK doc pages
  • Need to run tox -e docs locally to verify the generated HTML renders correctly (don't have the full tox setup right now)

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

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 open-telemetry#2573

Assisted-by: Claude Opus 4.6
Signed-off-by: Om Yarewar <[email protected]>
@OmYarewar
OmYarewar requested a review from a team as a code owner May 7, 2026 17:56
@linux-foundation-easycla

linux-foundation-easycla Bot commented May 7, 2026

Copy link
Copy Markdown

CLA Missing ID

@MikeGoldsmith

Copy link
Copy Markdown
Member

Hi @OmYarewar - please can you sign the CLA? We need you to sign that for us to accept your contribution.

@emdneto

emdneto commented May 12, 2026

Copy link
Copy Markdown
Member

Thanks for the PR!

Just a heads-up: we no longer update CHANGELOG.md directly. The changelog is now generated from changelog fragments using Towncrier.

Please add the appropriate changelog fragment for this change instead of editing CHANGELOG.md manually. You can find the instructions and expected format in CONTRIBUTING.md.

@github-actions

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions Bot added the Stale label May 27, 2026
@github-actions github-actions Bot removed the Stale label May 28, 2026
@lzchen lzchen moved this to Ready for review in Python PR digest May 28, 2026
@lzchen lzchen moved this from Ready for review to Easy to review / merge / close in Python PR digest May 28, 2026
@lzchen

lzchen commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@OmYarewar

Are you still working on this? Please sign the CLA so we can review and merge this.

@xrmx xrmx moved this from Easy to review / merge / close to Reviewed PRs that need fixes in Python PR digest Jun 17, 2026
@github-actions

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions Bot added the Stale label Jun 26, 2026
@github-actions github-actions Bot removed the Stale label Jun 27, 2026
@github-actions

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions Bot added the Stale label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Reviewed PRs that need fixes

Development

Successfully merging this pull request may close these issues.

Some documentation not built into sphinx docs

5 participants