From 5b32ffcbf900b23765368e35f833eeccb75d9c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Collonval?= Date: Wed, 4 Sep 2024 17:05:03 +0200 Subject: [PATCH] Fix sphinx doc generation --- docs/conf.py | 12 ++++++++++++ .../src/opentelemetry/sdk/metrics/__init__.py | 2 ++ .../metrics/_internal/exemplar/exemplar_reservoir.py | 8 ++++---- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 3aa7e022e3a..ad2c6aa6b3b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -138,6 +138,18 @@ "py:class", "opentelemetry.proto.collector.logs.v1.logs_service_pb2.ExportLogsServiceRequest", ), + ( + "py:class", + "opentelemetry.sdk.metrics._internal.exemplar.exemplar_reservoir.FixedSizeExemplarReservoirABC", + ), + ( + "py:class", + "opentelemetry.sdk.metrics._internal.exemplar.exemplar.Exemplar", + ), + ( + "py:class", + "opentelemetry.sdk.metrics._internal.aggregation._Aggregation", + ) ] # Add any paths that contain templates here, relative to this directory. diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/__init__.py index 80fc953da41..b89c08da042 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/__init__.py @@ -19,6 +19,7 @@ AlignedHistogramBucketExemplarReservoir, AlwaysOffExemplarFilter, AlwaysOnExemplarFilter, + Exemplar, ExemplarFilter, ExemplarReservoir, SimpleFixedSizeExemplarReservoir, @@ -38,6 +39,7 @@ "AlignedHistogramBucketExemplarReservoir", "AlwaysOnExemplarFilter", "AlwaysOffExemplarFilter", + "Exemplar", "ExemplarFilter", "ExemplarReservoir", "Meter", diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_reservoir.py b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_reservoir.py index a78cde29fd3..1dcbfe47dae 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_reservoir.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_reservoir.py @@ -60,10 +60,10 @@ def collect(self, point_attributes: Attributes) -> List[Exemplar]: sampling period Args: - point_attributes The attributes associated with metric point. + point_attributes: The attributes associated with metric point. Returns: - a list of :class:`opentelemetry.sdk.metrics.exemplar.Exemplar`s. Returned + a list of ``opentelemetry.sdk.metrics._internal.exemplar.exemplar.Exemplar`` s. Returned exemplars contain the attributes that were filtered out by the aggregator, but recorded alongside the original measurement. """ @@ -164,10 +164,10 @@ def collect(self, point_attributes: Attributes) -> List[Exemplar]: sampling period Args: - point_attributes The attributes associated with metric point. + point_attributes: The attributes associated with metric point. Returns: - a list of :class:`opentelemetry.sdk.metrics.exemplar.Exemplar`s. Returned + a list of ``opentelemetry.sdk.metrics._internal.exemplar.exemplar.Exemplar`` s. Returned exemplars contain the attributes that were filtered out by the aggregator, but recorded alongside the original measurement. """