Documentation improvements for published API reference#214
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix broken links and improve documentation
Documentation improvements for published API reference
Jun 19, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the docstrings and inline documentation that drive the published API reference for microsoft-opentelemetry, primarily to fix broken cross-references and to provide missing module/enum/constant descriptions for the Agent365 (a365) surface area.
Changes:
- Fully-qualifies Sphinx reST cross-reference targets (
:func:,:meth:,:class:,:data:) to avoid “Cross reference not found” in docfx output. - Adds/updates module docstrings and enum/constant member documentation so key symbols render with helpful descriptions.
- Reformats docstrings to avoid docutils formatting errors (e.g., indentation issues, cramped param blocks).
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/microsoft/opentelemetry/a365/runtime/init.py | Adds package docstring describing runtime helpers. |
| src/microsoft/opentelemetry/a365/langchain/init.py | Adds package docstring describing LangChain integration behavior. |
| src/microsoft/opentelemetry/a365/hosting/scope_helpers/populate_invoke_agent_scope.py | Reformats function docstring to Google-style sections. |
| src/microsoft/opentelemetry/a365/hosting/middleware/output_logging_middleware.py | Documents A365_PARENT_TRACEPARENT_KEY and fully-qualifies doc cross-references. |
| src/microsoft/opentelemetry/a365/core/utils.py | Fully-qualifies :meth: reference in get_traceparent docstring. |
| src/microsoft/opentelemetry/a365/core/tool_type.py | Adds per-member enum documentation comments. |
| src/microsoft/opentelemetry/a365/core/models/messages.py | Fixes module-docstring URL formatting; adds enum member docs. |
| src/microsoft/opentelemetry/a365/core/inference_operation_type.py | Adds per-member enum documentation comments. |
| src/microsoft/opentelemetry/a365/core/guardrail_target_type.py | Adds per-member constant documentation comments. |
| src/microsoft/opentelemetry/a365/core/guardrail_risk_severity.py | Adds per-member constant documentation comments. |
| src/microsoft/opentelemetry/a365/core/guardrail_decision_type.py | Adds per-member constant documentation comments. |
| src/microsoft/opentelemetry/a365/core/exporters/utils.py | Replaces internal “vendored from …” note with customer-facing summary. |
| src/microsoft/opentelemetry/a365/core/exporters/span_processor.py | Removes internal vendoring note from docstring. |
| src/microsoft/opentelemetry/a365/core/exporters/enriching_span_processor.py | Replaces internal “vendored from …” note with customer-facing summary. |
| src/microsoft/opentelemetry/a365/core/exporters/enriched_span.py | Replaces internal “vendored from …” note with customer-facing summary. |
| src/microsoft/opentelemetry/a365/core/exporters/agent365_exporter.py | Replaces internal “vendored from …” note with customer-facing summary. |
| src/microsoft/opentelemetry/a365/core/exporters/agent365_exporter_options.py | Rewrites module docstring to describe exported configuration options. |
| src/microsoft/opentelemetry/a365/core/constants.py | Converts header comment into a module docstring describing constant purpose. |
| src/microsoft/opentelemetry/a365/core/init.py | Adds module docstring summarizing the core primitives and surface area. |
| src/microsoft/opentelemetry/a365/constants.py | Replaces internal “superset of …” note with customer-facing summary. |
| src/microsoft/opentelemetry/init.py | Fully-qualifies use_microsoft_opentelemetry doc reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
rads-1996
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The published reference docs (learn.microsoft.com/python/api/microsoft-opentelemetry) have broken cross-references, missing module/enum descriptions, internal-only notes, and a malformed docstring. These changes fix the docstrings and comments that drive doc generation.
Cross-references
Fully-qualify
:func:/:class:/:meth:/:data:targets so the docfx build resolves them instead of emitting "Cross reference not found":use_microsoft_opentelemetry(opentelemetry/__init__.py)OpenTelemetryScope.inject_context_to_headers(a365/core/utils.py)OutputScope,A365_PARENT_TRACEPARENT_KEY(output_logging_middleware.py; also propagates to the re-exportedmiddleware.*/hosting.*views)Descriptions & content
#:comments:MessageRole,FinishReason,Modality,ToolType,InferenceOperationType,GuardrailDecisionType,GuardrailRiskSeverity,GuardrailTargetType.a365/core,a365/langchain(was empty),a365/runtime, anda365/core/constants.py— bringing them in line withhosting.A365_PARENT_TRACEPARENT_KEYgiven a doc comment so it renders as a documented, linkable target.Internal-facing text
Removed "Vendored from microsoft-agents-a365-observability*" lines from 6 exporter modules and the "Superset of…" note in
a365/constants.py, replacing them with customer-centered summaries.Malformed docstrings
:param:/:return:block inpopulate_invoke_agent_scope.pyto Google style.Unexpected indentationdocutils error from indented URLs inmodels/messages.py.All changes are docstring/comment-only except adding a doc comment to the existing
A365_PARENT_TRACEPARENT_KEYconstant.