colossus

metrics

package metrics

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. metrics
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait ActorMetrics extends Actor with ActorLogging

  2. sealed trait AggregationType extends AnyRef

  3. class BaseHistogram extends AnyRef

    This is the actual histogram data structure.

    This is the actual histogram data structure. It knows nothing of tags or metrics

  4. type BaseMetricMap[T] = Map[MetricAddress, BaseValueMap[T]]

  5. type BaseValueMap[T] = Map[TagMap, T]

  6. class BasicCounter extends Counter

  7. class BasicGauge extends AnyRef

  8. class BasicRate extends AnyRef

  9. final case class BucketList(buckets: Vector[Int]) extends AnyVal with Product with Serializable

  10. trait Collection[L <: Locality] extends AnyRef

  11. case class CollectionContext(globalTags: TagMap, interval: FiniteDuration) extends Product with Serializable

  12. class Collector extends Actor with ActorMetrics

  13. case class CollectorConfig(intervals: Seq[FiniteDuration]) extends Product with Serializable

    This is passed to new event collectors in addition to their own config.

    This is passed to new event collectors in addition to their own config.

    TODO: we might want to include global tags in here as well, and remove them from CollectionContext. This would mean event collectors would be constructed with global tagsinstead of them being passed in during collection, but right now that basically already happens since the tags are passed in during the collection's construction and then it passes it to each collector

    intervals

    The aggregation intervals configured for the MetricSystem this collection belongs to

  14. class ConcreteGauge extends Gauge with LocalLocality with TickedCollector

  15. class ConcreteRate extends Rate with LocalLocality with TickedCollector

  16. trait Counter extends EventCollector

  17. case class CounterParams(address: MetricAddress) extends MetricParams[Counter, CounterParams] with Product with Serializable

  18. class DuplicateMetricException extends Exception

  19. trait EventCollector extends AnyRef

  20. class EventCollectorException extends Exception

  21. trait EventLocality[E <: EventCollector] extends AnyRef

  22. trait Gauge extends EventCollector

  23. case class GaugeParams(address: MetricAddress, expireAfter: Duration = 1.hour, expireTo: Option[Long] = None) extends MetricParams[Gauge, GaugeParams] with Product with Serializable

  24. trait Generator[C <: EventCollector, P] extends AnyRef

    This is a typeclass that is basically just an EventCollector factory.

  25. case class GroupBy(tags: Set[String], aggregationType: AggregationType) extends Product with Serializable

  26. trait Histogram extends EventCollector

  27. case class HistogramParams(address: MetricAddress, bucketRanges: BucketList = Histogram.defaultBucketRanges, percentiles: List[Double] = Histogram.defaultPercentiles, sampleRate: Double = 1.0, pruneEmpty: Boolean = false) extends MetricParams[Histogram, HistogramParams] with Product with Serializable

  28. class IntervalAggregator extends Actor with ActorLogging

  29. class LocalCollection extends Collection[LocalLocality]

    A Local collection is designed only to be used inside an actor or otherwise thread-safe environment.

    A Local collection is designed only to be used inside an actor or otherwise thread-safe environment. Notice that even though the collection we're storing the event collectors is thread-safe, the collectors themselves are not. The collector actor must be the actor receiving events for metrics in the map

    note - this is not intended to be directly constructed by users

  30. class LocalCounter extends BasicCounter with LocalLocality

  31. trait LocalLocality extends Locality with MetricProducer

  32. sealed trait Locality extends AnyRef

  33. class LoggerSender extends MetricSender

  34. class LoggerSenderActor extends Actor with ActorLogging with MetricsLogger

    Simple sender that just prints the stats to the log

  35. case class MetricAddress(components: List[String]) extends Product with Serializable

  36. trait MetricEvent extends AnyRef

  37. case class MetricFilter(address: MetricAddress, valueFilter: MetricValueFilter, alias: Option[MetricAddress] = None) extends Product with Serializable

    A metric filter is essentially a selector for a metric along with a filter for processing/aggregating the values

  38. trait MetricFormatter[T] extends AnyRef

  39. case class MetricFragment(address: MetricAddress, tags: TagMap, value: RawMetricValue) extends Product with Serializable

  40. class MetricInterval extends AnyRef

  41. type MetricMap = Map[MetricAddress, BaseValueMap[MetricValue]]

  42. trait MetricParams[E <: EventCollector, T] extends AnyRef

    Since we are basically requiring every EventCollector to be constructed with a single parameter (which should be a case class), this trait is required to be extended by that parameter.

    Since we are basically requiring every EventCollector to be constructed with a single parameter (which should be a case class), this trait is required to be extended by that parameter. The type parameter exists solely for the purpose of type inference, so we can do getOrAdd(Rate(...)), and simply by supplying the Rate (which returns a RateParams, which extends MetricParams[Rate]), the method can infer that it should be returning a Rate

  43. trait MetricProducer extends AnyRef

    Anything that eventually expands to a set of raw stats extends this

  44. class MetricReporter extends Actor with ActorLogging

  45. case class MetricReporterConfig(metricAddress: MetricAddress, metricSenders: Seq[MetricSender], globalTags: Option[TagGenerator] = None, filters: MetricReporterFilter = MetricReporterFilter.All, includeHostInGlobalTags: Boolean = true) extends Product with Serializable

    Configuration class for the metric reporter

    Configuration class for the metric reporter

    metricAddress

    The MetricAddress of the MetricSystem that this reporter is a member

    metricSenders

    A list of MetricSender instances that the reporter will use to send metrics

    globalTags
    filters
    includeHostInGlobalTags

  46. sealed trait MetricReporterFilter extends AnyRef

    Tells a MetricReporter how to filter its Metrics before handing off to a Sender.

  47. trait MetricSender extends AnyRef

  48. case class MetricSystem extends Product with Serializable

    The MetricSystem is a set of actors which handle the background operations of dealing with metrics.

    The MetricSystem is a set of actors which handle the background operations of dealing with metrics. In most cases, you only want to have one MetricSystem per application.

    Metrics are generated periodically by a Tick message published on the global event bus. By default this happens once per second, but it can be configured to any time interval. So while events are being collected as they occur, compiled metrics (such as rates and histogram percentiles) are generated once per tick.

  49. case class MetricSystemConfig(tickPeriod: FiniteDuration = 1.second) extends Product with Serializable

  50. trait MetricValue extends AnyRef

    The base trait for any exported value from an event collector

    The base trait for any exported value from an event collector

    This requires that every matric value is a semi-group (associative + operation), however they should really be monoids (semi-group with a zero value). Unfortunately this cannot be enforced by this trait since these are passed in actor messages and must be monomorphic

  51. case class MetricValueFilter(filter: Option[TagSelector], aggregate: Option[GroupBy]) extends Product with Serializable

  52. case class OpenTsdbSender(host: String, port: Int) extends MetricSender with Product with Serializable

  53. class OpenTsdbSenderActor extends Actor with ActorLogging with MetricsLogger

  54. class PeriodicHistogram extends Histogram with TickedCollector with LocalLocality

    A periodic histogram multiplexes a histogram into several with different periods of resetting

    A periodic histogram multiplexes a histogram into several with different periods of resetting

    Ticks are controlled externally so we can ensure that we get a complete set of data before resetting the hists

  55. trait Rate extends EventCollector

  56. case class RateParams(address: MetricAddress, pruneEmpty: Boolean) extends MetricParams[Rate, RateParams] with Product with Serializable

  57. type RawMetricMap = Map[MetricAddress, BaseValueMap[RawMetricValue]]

  58. type RawMetricValue = Long

  59. type RawValueMap = Map[TagMap, RawMetricValue]

  60. implicit final class RichMetricMap extends AnyVal

  61. implicit final class RichRawMetricMap extends AnyVal

  62. implicit final class RichRawValueMap extends AnyVal

  63. implicit final class RichTagMap extends AnyVal

  64. implicit final class RichValueMap extends AnyVal

  65. class SharedCollection extends Collection[SharedLocality]

    A Shared collection is a collection where every metric it returns is completely thread-safe.

    A Shared collection is a collection where every metric it returns is completely thread-safe. A Shared collection is useful if you want to pass one collection to many actors, but be aware that since every event is sent as a separate actor message (as opposed to local collections which collect events just as function calls), this should not be used for very-high frequency events.

  66. class SharedCounter extends Counter with SharedLocality

  67. class SharedGauge extends Gauge with SharedLocality

  68. class SharedHistogram extends Histogram with SharedLocality

  69. trait SharedLocality extends Locality

  70. class SharedRate extends Rate with SharedLocality

    Notice - the SharedRate is just a front for sending actor messages.

    Notice - the SharedRate is just a front for sending actor messages. The collector must be the actor that actually has access to the concrete rate, where is should call it's "event" method when it receives this message

  71. case class Snapshot(min: Int, max: Int, count: Int, percentiles: Map[Double, Int]) extends Product with Serializable

  72. class SystemMetricsCollector extends AnyRef

  73. trait TagGenerator extends AnyRef

  74. type TagMap = Map[String, String]

  75. case class TagSelector(tags: Map[String, Seq[String]]) extends Product with Serializable

    Used to select one or more values on one or more tags

    Used to select one or more values on one or more tags

    eg. Suppose we have a metric "foo" with a tag named "bar" with values "A", "B", "C". We can pass a selector "foo" -> ["A", "B"] to indicate we wish to select values on the metric where "foo" is "A" or "B"

  76. class TaggedHistogram extends AnyRef

  77. trait TickedCollector extends EventCollector

  78. type ValueMap = Map[TagMap, MetricValue]

Value Members

  1. object AggregationType

    An aggregation type defined how several values for the same metric (each with different tags) get merged into one value.

    An aggregation type defined how several values for the same metric (each with different tags) get merged into one value. Notice that these only get called when there is at least one value to aggregate. The Natural type uses the + operation defined on the MetricValue

  2. object Collection

  3. object Counter

  4. object EventLocality

  5. object Gauge

  6. object Histogram

    A Basic log-scale histogram, mainly designed to measure latency

    A Basic log-scale histogram, mainly designed to measure latency

    Each bucket handles an increasingly large range of values from 0 to MAX_INT.

  7. object IntervalAggregator

  8. object LocalCollection

  9. object LoggerSender extends MetricSender

  10. object MetricAddress extends Serializable

  11. object MetricFilter extends Serializable

  12. object MetricFilterParser extends RegexParsers

  13. object MetricFilters

  14. object MetricMap

  15. object MetricReporter

  16. object MetricReporterFilter

  17. object MetricSender

  18. object MetricSystem extends Serializable

  19. object MetricValueFilter extends Serializable

  20. object MetricValues

  21. object OpenTsdbFormatter extends MetricFormatter[String]

  22. object PeriodicHistogram

  23. object Rate

  24. object RawMetricMap

  25. object SharedCollection

  26. object Snapshot extends Serializable

  27. object TagMap

  28. object TagSelector extends Serializable

  29. object ValueMap

  30. package senders

  31. package testkit

Inherited from AnyRef

Inherited from Any

Ungrouped