Table of Contents

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 OpenTelemetryOptions

OpenTelemetry options.

MetricsOptions(PrometheusOptions)

Initializes a new instance of the MetricsOptions class.

public MetricsOptions(PrometheusOptions prometheus)

Parameters

prometheus PrometheusOptions

Prometheus options.

Properties

AttachServiceName

Gets or sets a value indicating whether the service name is set on metrics.

public bool AttachServiceName { get; set; }

Property Value

bool

CustomMetricMeter

Gets or sets the custom metric meter to send metrics to.

public ICustomMetricMeter? CustomMetricMeter { get; set; }

Property Value

ICustomMetricMeter

CustomMetricMeterOptions

Gets or sets the custom metric meter options. Only applies if CustomMetricMeter is not null.

public CustomMetricMeterOptions? CustomMetricMeterOptions { get; set; }

Property Value

CustomMetricMeterOptions

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

IReadOnlyCollection<KeyValuePair<string, string>>

MetricPrefix

Gets or sets the metric prefix for internal Temporal metrics. If unset, the default is "temporal_".

public string? MetricPrefix { get; set; }

Property Value

string

OpenTelemetry

Gets or sets the OpenTelemetry metrics options.

public OpenTelemetryOptions? OpenTelemetry { get; set; }

Property Value

OpenTelemetryOptions

Prometheus

Gets or sets the Prometheus metrics options.

public PrometheusOptions? Prometheus { get; set; }

Property Value

PrometheusOptions

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.