A Counter simply keeps track of how many times an event occurred.
A set of data points summarized into a histogram, mean, min, and max.
A set of data points summarized into a histogram, mean, min, and max. Distributions are immutable.
A Counter that sends modifications to a set of "fanout" counters also.
A StatsCollection that sends counter and metric updates to a set of other (fanout) collections.
Log all collected stats to Graphite
Log all collected stats as a json line to a java logger at a regular interval.
A StatsListener that cycles over a given period, and once each period, grabs a snapshot of the given StatsCollection and computes deltas since the previous timeslice.
A StatsListener that cycles over a given period, and once each period, grabs a snapshot of the given StatsCollection and computes deltas since the previous timeslice. For example, for a one-minute period, it grabs a snapshot of stats at the top of each minute, and for the rest of the minute, reports these "latched" stats.
A StatsCollection that sends counter and metric updates to the global Stats
object as they
happen, and can be asked to flush its stats back into another StatsCollection with a prefix.
A StatsCollection that sends counter and metric updates to the global Stats
object as they
happen, and can be asked to flush its stats back into another StatsCollection with a prefix.
For example, if the prefix is "transaction10", then updating a counter "exceptions" will update
this collection and Stats
simultaneously for "exceptions". When/if the collection is flushed
into Stats
at the end of the transaction, "transaction10.exceptions" will be updated with this
collection's "exception" count.
A Metric collates data points and can report a Distribution.
Concrete StatsProvider that tracks counters and timings.
Attaches to a StatsCollection and reports on all the counters, metrics, gauges, and labels.
Attaches to a StatsCollection and reports on all the counters, metrics, gauges, and labels. Each report resets state, so counters are reported as deltas, and metrics distributions are only tracked since the last report.
Trait for anything that collects counters, timings, and gauges, and can report them in name/value maps.
Trait for anything that collects counters, timings, and gauges, and can report them in name/value maps.
Many helper methods are provided, with default implementations that just call back into the abstract methods, so a concrete implementation only needs to fill in the abstract methods.
To recap the README:
- counter: a value that never decreases (like "exceptions" or "completed_transactions") - gauge: a discrete instantaneous value (like "heap_used" or "current_temperature") - metric: a distribution (min, max, median, 99th percentile, ...) like "event_timing" - label: an instantaneous informational string for debugging or status checking
Immutable summary of counters, metrics, gauges, and labels.
Coalesce all events (counters, timings, etc.) that happen in this thread within this transaction, and log them as a single unit at the end.
Coalesce all events (counters, timings, etc.) that happen in this thread within this transaction, and log them as a single unit at the end. This is useful for logging everything that happens within an HTTP request/response cycle, or similar.
Dump "w3c" style stats to a logger.
Dump "w3c" style stats to a logger.
This may be used as a periodic dump (by calling write
directly) or to dump stats within a
work unit, using the TransactionalStatsCollection
API.
Log all collected w3c stats at a regular interval.
Write stats to Graphite.
Write stats to Graphite. Both a prefix and/or a service name can be provided to be appended to the front of the metric keys.
use GraphiteStatsLoggerFactory
A StatsProvider that doesn't actually save or report anything.
Get the StatsCollection for your "local state".
Get the StatsCollection for your "local state".
Future, Local (from twitter-util)
A LocalStatsCollection is associated with a name, which will be used as the prefix when flushing
the local counters and metrics back into the global Stats
. Because it's stored in a Local
,
a collection can be looked up several times and return the same object, as long as it's in the
same "flow of execution" (as defined by Future
).
Counters and metrics that are updated on a LocalStatsCollection are also updated on the global
Stats
object, using the same names. When flushed, these counters and metrics are saved into
the global Stats
with the collection's name as a prefix.
Singleton StatsCollector that collects performance data for the application.
Get a StatsCollection specific to this thread.
Get a StatsCollection specific to this thread.
use LocalStatsCollection instead
A Counter simply keeps track of how many times an event occurred. All operations are atomic and thread-safe.