class Temporalio::Runtime::MetricsOptions

@return [String, nil] Prefix to put on every Temporal metric. If unset, defaults to ‘temporal_`.
@!attribute metric_prefix
@return [Hash<String, String>, nil] Resource tags to be applied to all metrics.
@!attribute global_tags
@return [Boolean] Whether to put the service_name on every metric.
@!attribute attach_service_name
opentelemetry.
@return [PrometheusMetricsOptions, nil] Prometheus options if using Prometheus. This is mutually exclusive with
@!attribute prometheus
exclusive with prometheus.
@return [OpenTelemetryMetricsOptions, nil] OpenTelemetry options if using OpenTelemetry. This is mutually
@!attribute opentelemetry
Metrics options for runtime telemetry. Either {opentelemetry} or {prometheus} required, but not both.

def _to_bridge

@!visibility private
def _to_bridge
  # @type self: MetricsOptions
  Internal::Bridge::Runtime::MetricsOptions.new(
    opentelemetry: opentelemetry&._to_bridge,
    prometheus: prometheus&._to_bridge,
    attach_service_name:,
    global_tags:,
    metric_prefix:
  )
end

def initialize(

Parameters:
  • metric_prefix (String, nil) -- Prefix to put on every Temporal metric. If unset, defaults to `temporal_`.
  • global_tags (Hash, nil) -- Resource tags to be applied to all metrics.
  • attach_service_name (Boolean) -- Whether to put the service_name on every metric.
  • prometheus (PrometheusMetricsOptions, nil) -- Prometheus options if using Prometheus. This is mutually
  • opentelemetry (OpenTelemetryMetricsOptions, nil) -- OpenTelemetry options if using OpenTelemetry. This is
def initialize(
  opentelemetry: nil,
  prometheus: nil,
  attach_service_name: true,
  global_tags: nil,
  metric_prefix: nil
)
  super
end