Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval committed Sep 4, 2024
1 parent c0787ab commit e2b7778
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Exemplar:
was recorded, for example the span and trace ID of the active span when the
exemplar was recorded.
Attributes:
Attributes
trace_id: (optional) The trace associated with a recording
span_id: (optional) The span associated with a recording
time_unix_nano: The time of the observation
Expand All @@ -37,6 +37,10 @@ class Exemplar:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#exemplars
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#exemplar
"""
# TODO Fix doc - if using valid Google `Attributes:` key, the attributes are duplicated
# one will come from napoleon extension and the other from autodoc extension. This
# will raise an sphinx error of duplicated object description
# See https://github.com/sphinx-doc/sphinx/issues/8664

filtered_attributes: Attributes
value: Union[int, float]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def should_sample(
) -> bool:
"""Returns whether or not a reservoir should attempt to filter a measurement.
Attributes:
Args:
value: The value of the measurement
timestamp: A timestamp that best represents when the measurement was taken
attributes: The complete set of measurement attributes
Expand All @@ -69,7 +69,7 @@ def should_sample(
) -> bool:
"""Returns whether or not a reservoir should attempt to filter a measurement.
Attributes:
Args:
value: The value of the measurement
timestamp: A timestamp that best represents when the measurement was taken
attributes: The complete set of measurement attributes
Expand All @@ -96,7 +96,7 @@ def should_sample(
) -> bool:
"""Returns whether or not a reservoir should attempt to filter a measurement.
Attributes:
Args:
value: The value of the measurement
timestamp: A timestamp that best represents when the measurement was taken
attributes: The complete set of measurement attributes
Expand All @@ -122,7 +122,7 @@ def should_sample(
) -> bool:
"""Returns whether or not a reservoir should attempt to filter a measurement.
Attributes:
Args:
value: The value of the measurement
timestamp: A timestamp that best represents when the measurement was taken
attributes: The complete set of measurement attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,17 @@ class Measurement:
"""
Represents a data point reported via the metrics API to the SDK.
Attributes:
Attributes
value: Measured value
time_unix_nano: The time the API call was made to record the Measurement
instrument: The instrument that produced this `Measurement`.
context: The active Context of the Measurement at API call time.
attributes: Measurement attributes
"""
# TODO Fix doc - if using valid Google `Attributes:` key, the attributes are duplicated
# one will come from napoleon extension and the other from autodoc extension. This
# will raise an sphinx error of duplicated object description
# See https://github.com/sphinx-doc/sphinx/issues/8664

value: Union[int, float]
time_unix_nano: int
Expand Down

0 comments on commit e2b7778

Please sign in to comment.