From 2257e936f02bd24b80529d5a96daf32e2ac24e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neum=C3=BCller?= Date: Tue, 28 Jun 2022 15:23:54 +0200 Subject: [PATCH 1/5] Propagate API module missing from docs. --- docs/api/index.rst | 1 + docs/api/propagate.rst | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 docs/api/propagate.rst diff --git a/docs/api/index.rst b/docs/api/index.rst index a13c9e698bb..6d7de101f50 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -8,6 +8,7 @@ OpenTelemetry Python API baggage context + propagate trace metrics environment_variables diff --git a/docs/api/propagate.rst b/docs/api/propagate.rst new file mode 100644 index 00000000000..a86beeaddce --- /dev/null +++ b/docs/api/propagate.rst @@ -0,0 +1,7 @@ +opentelemetry.propagate package +======================================== + +Module contents +--------------- + +.. automodule:: opentelemetry.propagate From 74152e6a636d4d6f33bcbfc948b1cd3b11766c34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neum=C3=BCller?= Date: Tue, 28 Jun 2022 15:30:41 +0200 Subject: [PATCH 2/5] Add CHANGELOG. --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40b62a40d03..dcd9d170a9a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#2748](https://github.com/open-telemetry/opentelemetry-python/pull/2748)) - Fix Jaeger propagator usage with NonRecordingSpan ([#2762](https://github.com/open-telemetry/opentelemetry-python/pull/2762)) +- Add `opentelemetry.propagate` moddule to the API reference documentation + ([#2785](https://github.com/open-telemetry/opentelemetry-python/pull/2785)) ## [1.12.0rc1-0.31b0](https://github.com/open-telemetry/opentelemetry-python/releases/tag/v1.12.0rc1-0.31b0) - 2022-05-17 From 9fc68f22891772b891555e2cc3fea9da1c934351 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neum=C3=BCller?= Date: Tue, 28 Jun 2022 15:48:17 +0200 Subject: [PATCH 3/5] Sphinx complains about more missing classes. --- docs/api/propagators.composite.rst | 7 +++++++ docs/api/propagators.rst | 10 ++++++++++ docs/api/propagators.textmap.rst | 7 +++++++ 3 files changed, 24 insertions(+) create mode 100644 docs/api/propagators.composite.rst create mode 100644 docs/api/propagators.rst create mode 100644 docs/api/propagators.textmap.rst diff --git a/docs/api/propagators.composite.rst b/docs/api/propagators.composite.rst new file mode 100644 index 00000000000..a5db537b80f --- /dev/null +++ b/docs/api/propagators.composite.rst @@ -0,0 +1,7 @@ +opentelemetry.propagators.textmap +==================================================== + +Module contents +--------------- + +.. automodule:: opentelemetry.propagators.textmap diff --git a/docs/api/propagators.rst b/docs/api/propagators.rst new file mode 100644 index 00000000000..08825315bef --- /dev/null +++ b/docs/api/propagators.rst @@ -0,0 +1,10 @@ +opentelemetry.propagators package +======================================== + +Subpackages +----------- + +.. toctree:: + + propagators.textmap + propagators.composite diff --git a/docs/api/propagators.textmap.rst b/docs/api/propagators.textmap.rst new file mode 100644 index 00000000000..a5db537b80f --- /dev/null +++ b/docs/api/propagators.textmap.rst @@ -0,0 +1,7 @@ +opentelemetry.propagators.textmap +==================================================== + +Module contents +--------------- + +.. automodule:: opentelemetry.propagators.textmap From 0370156b419b2e490b05e63bf4228ed108a6c725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neum=C3=BCller?= Date: Tue, 28 Jun 2022 16:10:30 +0200 Subject: [PATCH 4/5] More fixes, understood why Sphinx didn't find some link targets. --- docs/api/index.rst | 1 + docs/api/propagators.composite.rst | 4 ++-- docs/conf.py | 20 +++----------------- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/docs/api/index.rst b/docs/api/index.rst index 6d7de101f50..22d77fc5a08 100644 --- a/docs/api/index.rst +++ b/docs/api/index.rst @@ -9,6 +9,7 @@ OpenTelemetry Python API baggage context propagate + propagators trace metrics environment_variables diff --git a/docs/api/propagators.composite.rst b/docs/api/propagators.composite.rst index a5db537b80f..930ca0b88d7 100644 --- a/docs/api/propagators.composite.rst +++ b/docs/api/propagators.composite.rst @@ -1,7 +1,7 @@ -opentelemetry.propagators.textmap +opentelemetry.propagators.composite ==================================================== Module contents --------------- -.. automodule:: opentelemetry.propagators.textmap +.. automodule:: opentelemetry.propagators.composite diff --git a/docs/conf.py b/docs/conf.py index 55b1af7331b..6e42aa1bd1f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -97,6 +97,9 @@ # https://github.com/sphinx-doc/sphinx/pull/3744 nitpick_ignore = [ ("py:class", "ValueT"), + ("py:class", "CarrierT"), + ("py:obj", "opentelemetry.propagators.textmap.CarrierT"), + ("py:obj", "Union"), ( "py:class", "opentelemetry.sdk.metrics._internal.instrument._Synchronous", @@ -112,23 +115,6 @@ "py:class", "opentelemetry.trace._LinkBase", ), - # TODO: Understand why sphinx is not able to find this local class - ( - "py:class", - "opentelemetry.propagators.textmap.TextMapPropagator", - ), - ( - "py:class", - "opentelemetry.propagators.textmap.DefaultGetter", - ), - ( - "any", - "opentelemetry.propagators.textmap.TextMapPropagator.extract", - ), - ( - "any", - "opentelemetry.propagators.textmap.TextMapPropagator.inject", - ), ] # Add any paths that contain templates here, relative to this directory. From 8afed9c8ab65ed75743c4d22ba457e9f13c3f735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neum=C3=BCller?= Date: Tue, 28 Jun 2022 16:11:47 +0200 Subject: [PATCH 5/5] Update CHANGELOG. --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcd9d170a9a..2aa395855a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,7 +41,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#2748](https://github.com/open-telemetry/opentelemetry-python/pull/2748)) - Fix Jaeger propagator usage with NonRecordingSpan ([#2762](https://github.com/open-telemetry/opentelemetry-python/pull/2762)) -- Add `opentelemetry.propagate` moddule to the API reference documentation +- Add `opentelemetry.propagate` module and `opentelemetry.propagators` package + to the API reference documentation ([#2785](https://github.com/open-telemetry/opentelemetry-python/pull/2785))