Repository navigation
Conversation
This branch has not been deployed
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.
Adds the one missing docstring in
exporter/opentelemetry-exporter-otlp.Base branch is
docs-base, a snapshot ofopen-telemetry/opentelemetry-python@3462000f3, so the diff shows only this work. This pull request is against theocelotlfork and is not proposed upstream.What changed
One file, +36/-0, in five commits:
46573dbde Document opentelemetry.exporter.otlp.version6d4408197 Correct how the otlp exporter name is resolved from the environmented2a63303 State how an empty protocol environment variable is read758146e23 Note that the protocol value is stripped before it is matched2712c2201 Rewrap the protocol paragraphopentelemetry-exporter-otlpis a meta-package. Itssrc/tree holds apy.typedmarker and a single module,opentelemetry/exporter/otlp/version/__init__.py, which carries__version__and nothing else. There is no exporter code here at all: the distribution exists so thatpip install opentelemetry-exporter-otlppulls inopentelemetry-exporter-otlp-proto-grpcandopentelemetry-exporter-otlp-proto-httptogether. So the whole of this change is a module docstring plus an attribute docstring on__version__, and there was nothing else to document.The module docstring says what installing the distribution gets you, and names the two distributions an exporter class is actually imported from together with the three modules the classes live in. Its second paragraph covers the part of this package that is easy to get wrong. This distribution does register
otlpentry points in all three exporter groups (exporter/opentelemetry-exporter-otlp/pyproject.toml:34-41), and all three point at the gRPC exporters, but the SDK's environment-variable configuration never loads them._get_exporter_entry_pointatopentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py:155rewrites the nameotlptootlp_proto_grpcorotlp_proto_httpfirst, and the entry point loaded is the rewritten one, which the gRPC and HTTP distributions register. The choice comes fromOTEL_EXPORTER_OTLP_TRACES_PROTOCOLfalling back toOTEL_EXPORTER_OTLP_PROTOCOL(line 164), with both unset or empty giving gRPC (lines 166-168) and an unrecognised non-empty value raisingRuntimeError(lines 174-176). The value is stripped of surrounding whitespace at line 171 before it is matched, sogrpc\nout of a ConfigMap is read asgrpc.The attribute docstring follows the form used for the same
__version__attribute in #54.The release tooling rewrites only the
__version__assignment line (scripts/eachdist.py:541-542setssearch = "__version__ .*"), so neither docstring is disturbed by a version bump.Verification
Every command below was re-run after the last commit.
exporter/opentelemetry-exporter-otlp/src, measured by walking the AST: 0 gaps, down from 1 (mod_missing: 1).ruff checkandruff format --checkwith ruff 0.16.1, the version pinned indev-requirements.txt:23: pass, 1 file.pytest exporter/opentelemetry-exporter-otlp/tests -q: 1 passed.tox -e lint-opentelemetry-exporter-otlp-combined: 10.00/10, no messages. The name is declared in theenvlistattox.ini:75and mapped to a command attox.ini:284.tox -e docs:build finished with problems, 16 warnings, the same 16 asdocs-base, of the same four kinds (6_http.Compression, 6 ambiguousMeterProvider, 2types.Attributes, 2Attributes). This branch adds none. Nothing in this package is autodoc'd:docs/exporter/otlp/otlp.rst:3documents theopentelemetry.exporter.otlpnamespace package, not theversionmodule, so the new docstrings do not reach the rendered output.tox -e typecheck: 2 errors, both intemplatelib.pyof the CPython 3.14.6 standard library and neither in this repository. The identical two errors appear with this branch's change stashed, so they are pre-existing and not caused by this change.Nothing to decide
No
# pylint: disable=pragma was added, nodocs/conf.pyentry was needed, and no behaviour changed.