Sha256: 2a22a1bfbb82ee8bd2f148a5770f34dfee31b68aea378929b37c51e1f922c383

Contents?: true

Size: 567 Bytes

Versions: 2

Compression:

Stored size: 567 Bytes

Contents

require "frankenstein/request"

# A bundle of metrics intended for a single arbitrary stimulus.
#
#
class Brown::Agent::Stimulus::Metrics
	# The Frankenstein::Request instance for the stimulus processing.
	attr_reader :processing_ruler

	# When the stimulus last fired.
	attr_reader :last_trigger

	def initialize(prefix, registry:)
		@processing_ruler = Frankenstein::Request.new(prefix, outgoing: false, registry: registry)
		@last_trigger     = registry.gauge(:"#{prefix}_last_trigger_timestamp_seconds", "When this stimulus was most recently triggered")
	end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
brown-2.2.2.27.gbc378e8 lib/brown/agent/stimulus/metrics.rb
brown-2.2.2.25.g85ddf08 lib/brown/agent/stimulus/metrics.rb