Skip to content

docs: add missing modules to Sphinx autodoc configuration#5108

Draft
yosofbadr wants to merge 1 commit intoopen-telemetry:mainfrom
yosofbadr:docs/fix-sphinx-autodoc
Draft

docs: add missing modules to Sphinx autodoc configuration#5108
yosofbadr wants to merge 1 commit intoopen-telemetry:mainfrom
yosofbadr:docs/fix-sphinx-autodoc

Conversation

@yosofbadr
Copy link
Copy Markdown

Description

Several public Python modules were not wired into the Sphinx documentation build, meaning their classes, functions, and docstrings did not appear on ReadTheDocs. This PR adds the missing RST files and updates existing toctrees so these modules are included in the generated API documentation.

Fixes #2573

Changes

New RST files (API):

  • docs/api/_events.rstopentelemetry._events (EventLogger, EventLoggerProvider, etc.)
  • docs/api/trace.propagation.rstopentelemetry.trace.propagation (set_span_in_context, get_current_span)
  • docs/api/propagators.b3.rstopentelemetry.propagators.b3 (B3 propagator)
  • docs/api/propagators.jaeger.rstopentelemetry.propagators.jaeger (Jaeger propagator)

New RST files (SDK):

  • docs/sdk/_logs.export.rstopentelemetry.sdk._logs.export (BatchLogRecordProcessor, ConsoleLogExporter, etc.)

Updated toctrees:

  • docs/api/index.rst — added _events
  • docs/api/trace.rst — added trace.propagation
  • docs/api/propagators.rst — added propagators.b3 and propagators.jaeger
  • docs/sdk/_logs.rst — added _logs.export submodule section

Type of change

  • This change requires a documentation update

How Has This Been Tested?

  • Verified that each new RST file uses the correct automodule directive pointing to the corresponding Python module
  • Confirmed that autodoc_default_options in docs/conf.py already sets :members:, :undoc-members:, and :show-inheritance: globally, so the explicit flags in new RST files are consistent with the project convention

Does This PR Require a Contrib Repo Change?

  • No.

Checklist:

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

Add RST files for modules that were not wired into the Sphinx docs
build, and update existing toctrees to include them:

API:
- opentelemetry._events (EventLogger, EventLoggerProvider)
- opentelemetry.trace.propagation (set_span_in_context, get_current_span)
- opentelemetry.propagators.b3 (B3 propagator)
- opentelemetry.propagators.jaeger (Jaeger propagator)

SDK:
- opentelemetry.sdk._logs.export (BatchLogRecordProcessor, log exporters)

Refs open-telemetry#2573

Assisted-by: Claude Opus 4.6
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Not Signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some documentation not built into sphinx docs

1 participant