Class: Temporalio::Runtime::PrometheusMetricsOptions

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

Overview

Options for exporting metrics to Prometheus.

Instance Attribute Summary collapse

Instance Attribute Details

#bind_addressString

Returns Address to bind to for Prometheus endpoint.

Returns:

  • (String)

    Address to bind to for Prometheus endpoint.



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/temporalio/runtime.rb', line 205

PrometheusMetricsOptions = Struct.new(
  :bind_address,
  :counters_total_suffix,
  :unit_suffix,
  :durations_as_seconds,
  keyword_init: true
) do
  # @!visibility private
  def initialize(**kwargs)
    # @type var kwargs: untyped
    kwargs[:counters_total_suffix] = false unless kwargs.key?(:counters_total_suffix)
    kwargs[:unit_suffix] = false unless kwargs.key?(:unit_suffix)
    kwargs[:durations_as_seconds] = false unless kwargs.key?(:durations_as_seconds)
    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

Returns If true, all counters will include a _total suffix, default is false.

Returns:

  • (Boolean)

    If true, all counters will include a _total suffix, default is false.



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/temporalio/runtime.rb', line 205

PrometheusMetricsOptions = Struct.new(
  :bind_address,
  :counters_total_suffix,
  :unit_suffix,
  :durations_as_seconds,
  keyword_init: true
) do
  # @!visibility private
  def initialize(**kwargs)
    # @type var kwargs: untyped
    kwargs[:counters_total_suffix] = false unless kwargs.key?(:counters_total_suffix)
    kwargs[:unit_suffix] = false unless kwargs.key?(:unit_suffix)
    kwargs[:durations_as_seconds] = false unless kwargs.key?(:durations_as_seconds)
    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

Returns Whether to use float seconds instead of integer milliseconds for durations, default is false.

Returns:

  • (Boolean)

    Whether to use float seconds instead of integer milliseconds for durations, default is false.



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/temporalio/runtime.rb', line 205

PrometheusMetricsOptions = Struct.new(
  :bind_address,
  :counters_total_suffix,
  :unit_suffix,
  :durations_as_seconds,
  keyword_init: true
) do
  # @!visibility private
  def initialize(**kwargs)
    # @type var kwargs: untyped
    kwargs[:counters_total_suffix] = false unless kwargs.key?(:counters_total_suffix)
    kwargs[:unit_suffix] = false unless kwargs.key?(:unit_suffix)
    kwargs[:durations_as_seconds] = false unless kwargs.key?(:durations_as_seconds)
    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

Returns If true, all histograms will include the unit in their name as a suffix, default is false.

Returns:

  • (Boolean)

    If true, all histograms will include the unit in their name as a suffix, default is false.



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/temporalio/runtime.rb', line 205

PrometheusMetricsOptions = Struct.new(
  :bind_address,
  :counters_total_suffix,
  :unit_suffix,
  :durations_as_seconds,
  keyword_init: true
) do
  # @!visibility private
  def initialize(**kwargs)
    # @type var kwargs: untyped
    kwargs[:counters_total_suffix] = false unless kwargs.key?(:counters_total_suffix)
    kwargs[:unit_suffix] = false unless kwargs.key?(:unit_suffix)
    kwargs[:durations_as_seconds] = false unless kwargs.key?(:durations_as_seconds)
    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