Skip to content

Commit 0f96e19

Browse files
GoPaveltoumorokoshi
authored andcommitted
Add missing ABC for Metric (open-telemetry#391)
Fix open-telemetry#390
1 parent 052ae1b commit 0f96e19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

opentelemetry-api/src/opentelemetry/metrics/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,14 @@ class DefaultLabelSet(LabelSet):
8787
"""
8888

8989

90-
class Metric:
90+
class Metric(abc.ABC):
9191
"""Base class for various types of metrics.
9292
9393
Metric class that inherit from this class are specialized with the type of
9494
handle that the metric holds.
9595
"""
9696

97+
@abc.abstractmethod
9798
def get_handle(self, label_set: LabelSet) -> "object":
9899
"""Gets a handle, used for repeated-use of metrics instruments.
99100

0 commit comments

Comments
 (0)