Skip to content

Commit e2b7778

Browse files
committed
Fix doc
1 parent c0787ab commit e2b7778

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Exemplar:
2626
was recorded, for example the span and trace ID of the active span when the
2727
exemplar was recorded.
2828
29-
Attributes:
29+
Attributes
3030
trace_id: (optional) The trace associated with a recording
3131
span_id: (optional) The span associated with a recording
3232
time_unix_nano: The time of the observation
@@ -37,6 +37,10 @@ class Exemplar:
3737
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#exemplars
3838
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
3939
"""
40+
# TODO Fix doc - if using valid Google `Attributes:` key, the attributes are duplicated
41+
# one will come from napoleon extension and the other from autodoc extension. This
42+
# will raise an sphinx error of duplicated object description
43+
# See https://github.com/sphinx-doc/sphinx/issues/8664
4044

4145
filtered_attributes: Attributes
4246
value: Union[int, float]

opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exemplar/exemplar_filter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def should_sample(
4242
) -> bool:
4343
"""Returns whether or not a reservoir should attempt to filter a measurement.
4444
45-
Attributes:
45+
Args:
4646
value: The value of the measurement
4747
timestamp: A timestamp that best represents when the measurement was taken
4848
attributes: The complete set of measurement attributes
@@ -69,7 +69,7 @@ def should_sample(
6969
) -> bool:
7070
"""Returns whether or not a reservoir should attempt to filter a measurement.
7171
72-
Attributes:
72+
Args:
7373
value: The value of the measurement
7474
timestamp: A timestamp that best represents when the measurement was taken
7575
attributes: The complete set of measurement attributes
@@ -96,7 +96,7 @@ def should_sample(
9696
) -> bool:
9797
"""Returns whether or not a reservoir should attempt to filter a measurement.
9898
99-
Attributes:
99+
Args:
100100
value: The value of the measurement
101101
timestamp: A timestamp that best represents when the measurement was taken
102102
attributes: The complete set of measurement attributes
@@ -122,7 +122,7 @@ def should_sample(
122122
) -> bool:
123123
"""Returns whether or not a reservoir should attempt to filter a measurement.
124124
125-
Attributes:
125+
Args:
126126
value: The value of the measurement
127127
timestamp: A timestamp that best represents when the measurement was taken
128128
attributes: The complete set of measurement attributes

opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/measurement.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,17 @@ class Measurement:
2525
"""
2626
Represents a data point reported via the metrics API to the SDK.
2727
28-
Attributes:
28+
Attributes
2929
value: Measured value
3030
time_unix_nano: The time the API call was made to record the Measurement
3131
instrument: The instrument that produced this `Measurement`.
3232
context: The active Context of the Measurement at API call time.
3333
attributes: Measurement attributes
3434
"""
35+
# TODO Fix doc - if using valid Google `Attributes:` key, the attributes are duplicated
36+
# one will come from napoleon extension and the other from autodoc extension. This
37+
# will raise an sphinx error of duplicated object description
38+
# See https://github.com/sphinx-doc/sphinx/issues/8664
3539

3640
value: Union[int, float]
3741
time_unix_nano: int

0 commit comments

Comments
 (0)