This is the actual histogram data structure.
This is the actual histogram data structure. It knows nothing of tags or metrics
This is a typeclass that is basically just an EventCollector factory.
This is a typeclass that is basically just an EventCollector factory.
Note - we may be able to get rid of the Locality type-param since as of now it looks like we only need generators for local collectors, but we'll leave it for now since it's fully hidden from users anyway
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
Simple sender that just prints the stats to the log
A metric filter is essentially a selector for a metric along with a filter for processing/aggregating the values
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
Anything that eventually expands to a set of raw stats extends this
Configuration class for the metric reporter
Configuration class for the metric reporter
A MetricSender instance that the reporter will use to send metrics
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.
The ID of the metrics system
the base of the url describing the location of metrics within the system
an actor which serves as the clock for the metric system
an actor which serves as the database of the metric system
The frequency of the tick message
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
STAR's are purely for maintaining sanity when actors are being passed all over the place and are intended to help detect at compile time when we're sending a message to the wrong actor.
STAR's are purely for maintaining sanity when actors are being passed all over the place and are intended to help detect at compile time when we're sending a message to the wrong actor. eg, no more "foo: ActorRef" in parameters
It is not intended to ensure an actor can handle the messages that are sent to it. Perhaps we will switch to typed channels when those are more stable
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.
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
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"
Any metric that needs to be ticked by the external clock
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.