diff --git a/opentelemetry-api/src/opentelemetry/metrics/__init__.py b/opentelemetry-api/src/opentelemetry/metrics/__init__.py index 947d57b976d..c6b339be13c 100644 --- a/opentelemetry-api/src/opentelemetry/metrics/__init__.py +++ b/opentelemetry-api/src/opentelemetry/metrics/__init__.py @@ -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.