Skip to content

Commit

Permalink
Add missing ABC for Metric (open-telemetry#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoPavel committed Jan 31, 2020
1 parent 682ecc2 commit 27f04b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opentelemetry-api/src/opentelemetry/metrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,14 @@ class DefaultLabelSet(LabelSet):
"""


class Metric:
class Metric(abc.ABC):
"""Base class for various types of metrics.
Metric class that inherit from this class are specialized with the type of
handle that the metric holds.
"""

@abc.abstractmethod
def get_handle(self, label_set: LabelSet) -> "object":
"""Gets a handle, used for repeated-use of metrics instruments.
Expand Down

0 comments on commit 27f04b6

Please sign in to comment.