class documentation
class MetricMeter(ABC): (source)
Known subclasses: temporalio.common._NoopMetricMeter
, temporalio.runtime._MetricMeter
, temporalio.worker._workflow_instance._ReplaySafeMetricMeter
Metric meter for recording metrics.
Method | create |
Create a counter metric for adding values. |
Method | create |
Create a gauge metric for setting values. |
Method | create |
Create a gauge metric for setting values. |
Method | create |
Create a histogram metric for recording values. |
Method | create |
Create a histogram metric for recording values. |
Method | create |
Create a histogram metric for recording values. |
Method | with |
Create a new metric meter with the given attributes appended to the current set. |
Class Variable | noop |
Metric meter implementation that does nothing. |
@abstractmethod
def create_counter(self, name:
def create_counter(self, name:
str
, description: Optional[ str]
= None, unit: Optional[ str]
= None) -> MetricCounter
:
(source)
¶
@abstractmethod
def create_gauge(self, name:
def create_gauge(self, name:
str
, description: Optional[ str]
= None, unit: Optional[ str]
= None) -> MetricGauge
:
(source)
¶
@abstractmethod
def create_gauge_float(self, name:
def create_gauge_float(self, name:
str
, description: Optional[ str]
= None, unit: Optional[ str]
= None) -> MetricGaugeFloat
:
(source)
¶
@abstractmethod
def create_histogram(self, name:
def create_histogram(self, name:
str
, description: Optional[ str]
= None, unit: Optional[ str]
= None) -> MetricHistogram
:
(source)
¶
@abstractmethod
def create_histogram_float(self, name:
def create_histogram_float(self, name:
str
, description: Optional[ str]
= None, unit: Optional[ str]
= None) -> MetricHistogramFloat
:
(source)
¶
@abstractmethod
def create_histogram_timedelta(self, name:
def create_histogram_timedelta(self, name:
str
, description: Optional[ str]
= None, unit: Optional[ str]
= None) -> MetricHistogramTimedelta
:
(source)
¶
overridden in
temporalio.common._NoopMetricMeter
, temporalio.runtime._MetricMeter
, temporalio.worker._workflow_instance._ReplaySafeMetricMeter
Create a histogram metric for recording values.
Note, duration precision is millisecond. Also note, if "unit" is set as "duration", it will be converted to "ms" or "s" on the way out.
Parameters | |
name:str | Name for the metric. |
description:Optional[ | Optional description for the metric. |
unit:Optional[ | Optional unit for the metric. |
Returns | |
MetricHistogramTimedelta | Histogram metric. |
@abstractmethod
def with_additional_attributes(self, additional_attributes:
def with_additional_attributes(self, additional_attributes:
MetricAttributes
) -> MetricMeter
:
(source)
¶
overridden in
temporalio.common._NoopMetricMeter
, temporalio.runtime._MetricMeter
, temporalio.worker._workflow_instance._ReplaySafeMetricMeter
Create a new metric meter with the given attributes appended to the current set.
Parameters | |
additionalMetricAttributes | Additional attributes to append to the current set. |
Returns | |
MetricMeter | New metric meter. |
Raises | |
TypeError | Attribute values are not the expected type. |