Sha256: 19efba549d599bfab70eb9ae4b2184b81f4040b9134d09719621d5706b4d285b
Contents?: true
Size: 728 Bytes
Versions: 24
Compression:
Stored size: 728 Bytes
Contents
# frozen_string_literal: true module StatsD module Instrument # @note This class is part of the new Client implementation that is intended # to become the new default in the next major release of this library. class CaptureSink attr_reader :parent, :datagrams, :datagram_class def initialize(parent:, datagram_class: StatsD::Instrument::Datagram) @parent = parent @datagram_class = datagram_class @datagrams = [] end def sample?(_sample_rate) true end def <<(datagram) @datagrams << datagram_class.new(datagram) parent << datagram self end def clear @datagrams.clear end end end end
Version data entries
24 entries across 24 versions & 1 rubygems