Class: Temporalio::Runtime::PrometheusMetricsOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/temporalio/runtime.rb

Overview

Options for exporting metrics to Prometheus.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bind_address:, counters_total_suffix: false, unit_suffix: false, durations_as_seconds: false) ⇒ PrometheusMetricsOptions

Create Prometheus options.



251
252
253
254
255
256
257
258
# File 'lib/temporalio/runtime.rb', line 251

def initialize(
  bind_address:,
  counters_total_suffix: false,
  unit_suffix: false,
  durations_as_seconds: false
)
  super
end

Instance Attribute Details

#bind_addressString



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/temporalio/runtime.rb', line 243

class PrometheusMetricsOptions
  # Create Prometheus options.
  #
  # @param bind_address [String] Address to bind to for Prometheus endpoint.
  # @param counters_total_suffix [Boolean] If `true`, all counters will include a `_total` suffix.
  # @param unit_suffix [Boolean] If `true`, all histograms will include the unit in their name as a suffix.
  # @param durations_as_seconds [Boolean] Whether to use float seconds instead of integer milliseconds for
  #   durations.
  def initialize(
    bind_address:,
    counters_total_suffix: false,
    unit_suffix: false,
    durations_as_seconds: false
  )
    super
  end

  # @!visibility private
  def _to_bridge
    # @type self: PrometheusMetricsOptions
    Internal::Bridge::Runtime::PrometheusMetricsOptions.new(
      bind_address:,
      counters_total_suffix:,
      unit_suffix:,
      durations_as_seconds:
    )
  end
end

#counters_total_suffixBoolean



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/temporalio/runtime.rb', line 243

class PrometheusMetricsOptions
  # Create Prometheus options.
  #
  # @param bind_address [String] Address to bind to for Prometheus endpoint.
  # @param counters_total_suffix [Boolean] If `true`, all counters will include a `_total` suffix.
  # @param unit_suffix [Boolean] If `true`, all histograms will include the unit in their name as a suffix.
  # @param durations_as_seconds [Boolean] Whether to use float seconds instead of integer milliseconds for
  #   durations.
  def initialize(
    bind_address:,
    counters_total_suffix: false,
    unit_suffix: false,
    durations_as_seconds: false
  )
    super
  end

  # @!visibility private
  def _to_bridge
    # @type self: PrometheusMetricsOptions
    Internal::Bridge::Runtime::PrometheusMetricsOptions.new(
      bind_address:,
      counters_total_suffix:,
      unit_suffix:,
      durations_as_seconds:
    )
  end
end

#durations_as_secondsBoolean



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/temporalio/runtime.rb', line 243

class PrometheusMetricsOptions
  # Create Prometheus options.
  #
  # @param bind_address [String] Address to bind to for Prometheus endpoint.
  # @param counters_total_suffix [Boolean] If `true`, all counters will include a `_total` suffix.
  # @param unit_suffix [Boolean] If `true`, all histograms will include the unit in their name as a suffix.
  # @param durations_as_seconds [Boolean] Whether to use float seconds instead of integer milliseconds for
  #   durations.
  def initialize(
    bind_address:,
    counters_total_suffix: false,
    unit_suffix: false,
    durations_as_seconds: false
  )
    super
  end

  # @!visibility private
  def _to_bridge
    # @type self: PrometheusMetricsOptions
    Internal::Bridge::Runtime::PrometheusMetricsOptions.new(
      bind_address:,
      counters_total_suffix:,
      unit_suffix:,
      durations_as_seconds:
    )
  end
end

#unit_suffixBoolean



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/temporalio/runtime.rb', line 243

class PrometheusMetricsOptions
  # Create Prometheus options.
  #
  # @param bind_address [String] Address to bind to for Prometheus endpoint.
  # @param counters_total_suffix [Boolean] If `true`, all counters will include a `_total` suffix.
  # @param unit_suffix [Boolean] If `true`, all histograms will include the unit in their name as a suffix.
  # @param durations_as_seconds [Boolean] Whether to use float seconds instead of integer milliseconds for
  #   durations.
  def initialize(
    bind_address:,
    counters_total_suffix: false,
    unit_suffix: false,
    durations_as_seconds: false
  )
    super
  end

  # @!visibility private
  def _to_bridge
    # @type self: PrometheusMetricsOptions
    Internal::Bridge::Runtime::PrometheusMetricsOptions.new(
      bind_address:,
      counters_total_suffix:,
      unit_suffix:,
      durations_as_seconds:
    )
  end
end