spec/support/custom_collector.rb
##
# A demo metric on-demand
#
A demo metric on-demand
A demo metric on - demand
def bar_it_up(total:)
    metric = {}
    metric[:type] = 'custom'
    metric[:custom_labels] = {}
    metric[:on_demand_total] = total.to_i
    @logger.debug("[gruf-prometheus] Pushing custom metric on_demand_total to type collector #{Bigcommerce::Prometheus.server_host}:#{Bigcommerce::Prometheus.server_port}: #{metric.inspect}")
    @client.send_json(metric)
  rescue StandardError => e
    @logger.error("[gruf-prometheus] Prometheus failed to send on_demand_total stats: #{e.message}")
  end
def bar_it_up ( total : ) metric = { } metric [ :type ] = 'custom' metric [ :custom_labels ] = { } metric [ :on_demand_total ] = total . to_i @logger . debug ( "[gruf-prometheus] Pushing custom metric on_demand_total to type collector #{Bigcommerce::Prometheus.server_host}:#{Bigcommerce::Prometheus.server_port}: #{metric.inspect}" ) @client . send_json ( metric ) rescue StandardError => e @logger . error ( "[gruf-prometheus] Prometheus failed to send on_demand_total stats: #{e.message}" ) end
A demo metric on-demand
A demo metric on - demand
total
<not_specific>