class documentation
class MetricCommon(ABC): (source)
Known subclasses: temporalio.common.MetricCounter, temporalio.common.MetricGauge, temporalio.common.MetricGaugeFloat, temporalio.common.MetricHistogram, temporalio.common.MetricHistogramFloat, temporalio.common.MetricHistogramTimedelta, temporalio.common._NoopMetric, temporalio.runtime._MetricCommon, temporalio.worker._workflow_instance._ReplaySafeMetricCommon
Base for all metrics.
| Method | with |
Create a new metric with the given attributes appended to the current set. |
| Property | description |
Description for the metric if any. |
| Property | name |
Name for the metric. |
| Property | unit |
Unit for the metric if any. |
@abstractmethod
def with_additional_attributes(self, additional_attributes:
def with_additional_attributes(self, additional_attributes:
MetricAttributes) -> Self:
(source)
¶
overridden in
temporalio.common._NoopMetric, temporalio.runtime._MetricCommon, temporalio.worker._workflow_instance._ReplaySafeMetricCommonCreate a new metric with the given attributes appended to the current set.
| Parameters | |
additionalMetricAttributes | Additional attributes to append to the current set. |
| Returns | |
Self | New metric. |
| Raises | |
TypeError | Attribute values are not the expected type. |
overridden in
temporalio.common._NoopMetric, temporalio.runtime._MetricCommon, temporalio.worker._workflow_instance._ReplaySafeMetricCommonDescription for the metric if any.
overridden in
temporalio.common._NoopMetric, temporalio.runtime._MetricCommon, temporalio.worker._workflow_instance._ReplaySafeMetricCommonName for the metric.
overridden in
temporalio.common._NoopMetric, temporalio.runtime._MetricCommon, temporalio.worker._workflow_instance._ReplaySafeMetricCommonUnit for the metric if any.