We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 052ae1b commit 0f96e19Copy full SHA for 0f96e19
opentelemetry-api/src/opentelemetry/metrics/__init__.py
@@ -87,13 +87,14 @@ class DefaultLabelSet(LabelSet):
87
"""
88
89
90
-class Metric:
+class Metric(abc.ABC):
91
"""Base class for various types of metrics.
92
93
Metric class that inherit from this class are specialized with the type of
94
handle that the metric holds.
95
96
97
+ @abc.abstractmethod
98
def get_handle(self, label_set: LabelSet) -> "object":
99
"""Gets a handle, used for repeated-use of metrics instruments.
100
0 commit comments