Class MetricsOptions
- Namespace
- Temporalio.Runtime
- Assembly
- Temporalio.dll
Metrics options for a runtime. Prometheus or OpenTelemetry or CustomMetricMeter is required (but only one).
public class MetricsOptions : ICloneable
- Inheritance
-
MetricsOptions
- Implements
- Inherited Members
Constructors
MetricsOptions()
Initializes a new instance of the MetricsOptions class.
public MetricsOptions()
MetricsOptions(OpenTelemetryOptions)
Initializes a new instance of the MetricsOptions class.
public MetricsOptions(OpenTelemetryOptions openTelemetry)
Parameters
openTelemetry
OpenTelemetryOptionsOpenTelemetry options.
MetricsOptions(PrometheusOptions)
Initializes a new instance of the MetricsOptions class.
public MetricsOptions(PrometheusOptions prometheus)
Parameters
prometheus
PrometheusOptionsPrometheus options.
Properties
AttachServiceName
Gets or sets a value indicating whether the service name is set on metrics.
public bool AttachServiceName { get; set; }
Property Value
CustomMetricMeter
Gets or sets the custom metric meter to send metrics to.
public ICustomMetricMeter? CustomMetricMeter { get; set; }
Property Value
CustomMetricMeterOptions
Gets or sets the custom metric meter options. Only applies if CustomMetricMeter is not null.
public CustomMetricMeterOptions? CustomMetricMeterOptions { get; set; }
Property Value
GlobalTags
Gets or sets the tags to be put on every metric. Neither keys nor values may have newlines.
public IReadOnlyCollection<KeyValuePair<string, string>>? GlobalTags { get; set; }
Property Value
MetricPrefix
Gets or sets the metric prefix for internal Temporal metrics. If unset, the default is "temporal_".
public string? MetricPrefix { get; set; }
Property Value
OpenTelemetry
Gets or sets the OpenTelemetry metrics options.
public OpenTelemetryOptions? OpenTelemetry { get; set; }
Property Value
Prometheus
Gets or sets the Prometheus metrics options.
public PrometheusOptions? Prometheus { get; set; }
Property Value
Methods
Clone()
Create a shallow copy of these options.
public virtual object Clone()
Returns
- object
A shallow copy of these options and any transitive options fields.