Sha256: bb5fef0420f6c9e383af237e27411c3f6b8b53a918a01011d5fa841c7c243cc2
Contents?: true
Size: 696 Bytes
Versions: 99
Compression:
Stored size: 696 Bytes
Contents
require "inspec/utils/telemetry/collector" module Inspec # A Global method to add a data series object to the Telemetry Collection. # `data_series_name`s are unique, so `:dependency_group` will always return # the same object. # `data_point` is optional, you may also supply a block with several data points. # All data points should allow #to_s def self.record_telemetry_data(data_series_name, data_point = nil) coll = Inspec::Telemetry::Collector.instance return unless coll.telemetry_enabled? ds = coll.find_or_create_data_series(data_series_name) return unless ds.enabled? if block_given? ds << yield else ds << data_point end end end
Version data entries
99 entries across 99 versions & 2 rubygems