Class MetricMeter
- Namespace
- Temporalio.Common
- Assembly
- Temporalio.dll
Meter for creating metrics to record values on.
public abstract class MetricMeter
- Inheritance
-
MetricMeter
- Inherited Members
Methods
CreateCounter<T>(string, string?, string?)
Create a new counter. Performance is better if this counter is reused instead of recreating it.
public abstract MetricCounter<T> CreateCounter<T>(string name, string? unit = null, string? description = null) where T : struct
Parameters
name
stringName for the counter.
unit
stringUnit for the counter if any.
description
stringDescription for the counter if any.
Returns
- MetricCounter<T>
New counter.
Type Parameters
T
Type of value for the metric. Currently this must be an integer type.
CreateGauge<T>(string, string?, string?)
Create a new gauge. Performance is better if this gauge is reused instead of recreating it.
public abstract MetricGauge<T> CreateGauge<T>(string name, string? unit = null, string? description = null) where T : struct
Parameters
name
stringName for the gauge.
unit
stringUnit for the gauge if any.
description
stringDescription for the gauge if any.
Returns
- MetricGauge<T>
New gauge.
Type Parameters
T
Type of value for the metric. Currently this must be an integer or float type.
CreateHistogram<T>(string, string?, string?)
Create a new histogram. Performance is better if this histogram is reused instead of recreating it.
public abstract MetricHistogram<T> CreateHistogram<T>(string name, string? unit = null, string? description = null) where T : struct
Parameters
name
stringName for the histogram.
unit
stringUnit for the histogram if any.
description
stringDescription for the histogram if any.
Returns
- MetricHistogram<T>
New histogram.
Type Parameters
T
Type of value for the metric. Currently this must be an integer, float, or TimeSpan type. type.
WithTags(IEnumerable<KeyValuePair<string, object>>)
Create a new meter with the given tags appended. All metrics created off the meter will have the tags.
public abstract MetricMeter WithTags(IEnumerable<KeyValuePair<string, object>> tags)
Parameters
tags
IEnumerable<KeyValuePair<string, object>>Tags to append.
Returns
- MetricMeter
New meter.