Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@
"exclude-members": ",".join(_exclude_members),
}

# Napoleon configuration to avoid duplication with autodoc for dataclass fields
# Use ivar (instance variable) style for documenting attributes
napoleon_use_ivar = True

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down
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 @@ -38,11 +38,6 @@ class Exemplar:
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]
time_unix_nano: int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,14 @@ 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
instrument: Instrument
Expand Down
Loading