Class PeriodicStatisticsSink

java.lang.Object
com.arpnetworking.tsdcore.sinks.BaseSink
com.arpnetworking.tsdcore.sinks.PeriodicStatisticsSink
All Implemented Interfaces:
Sink

public final class PeriodicStatisticsSink extends BaseSink
Aggregates and periodically logs metrics about the aggregated data being record; effectively, this is metrics about metrics. The sink's original and primary purpose is to provide a quick sanity check on installations by generating metrics that the aggregator can then consume (and use to generate more metrics). More recently, this class has been extended to allow attribution of usage by bucketing and tagging the emitted periodic self-instrumentation metrics using configured tag keys whose values are lighted from the data flow itself. This class is thread safe.
Author:
Ville Koskela (ville dot koskela at inscopemetrics dot io)
  • Method Details

    • recordAggregateData

      public void recordAggregateData(PeriodicData periodicData)
      Description copied from interface: Sink
      Called when an additional PeriodicData instance is available for publication.
      Parameters:
      periodicData - The PeriodicData to be published.
    • close

      public void close()
      Description copied from interface: Sink
      Called to allow the publisher to clean-up. No further calls to recordAggregation will be made after a call to close.
    • toLogValue

      public Object toLogValue()
      Description copied from class: BaseSink
      Generate a Steno log compatible representation.
      Overrides:
      toLogValue in class BaseSink
      Returns:
      Steno log compatible representation.