Packages

p

ustats

package ustats

Default global stats collector.

Linear Supertypes
Probing, Stats, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ustats
  2. Probing
  3. Stats
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait BucketDistribution extends AnyRef
  2. final class Counter extends AnyVal

    A counter may only ever be increased (or reset when the application restarts).

  3. final class Gauge extends AnyVal

    Gauges may be increased and decreased.

  4. class Histogram extends AnyRef
  5. class ProbeFailedException extends Exception
  6. trait Probing extends AnyRef
  7. class Stats extends AnyRef

    A memory-efficient, concurrent-friendly metrics collection interface.

Value Members

  1. def addMetric(name: String): DoubleAdder

    Add a metric manually.

    Add a metric manually.

    This is a low-level escape hatch that should be used only when no other functions apply.

    Definition Classes
    Stats
  2. def counter(labels: (String, Any)*)(implicit name: Name): Counter

    Create and register a counter whose name is automatically derived from the val it is assigned to (plus a global prefix, if set).

    Create and register a counter whose name is automatically derived from the val it is assigned to (plus a global prefix, if set).

    E.g.

    val myFirstStatistic: stats.Counter = stats.counter("foo" -> "bar")

    will create a new counter whose metrics will be exposed as my_first_statistic{foo="bar"}

    Definition Classes
    Stats
  3. def gauge(labels: (String, Any)*)(implicit name: Name): Gauge
    Definition Classes
    Stats
  4. def histogram(labels: (String, Any)*)(implicit name: Name): Histogram
    Definition Classes
    Stats
  5. def histogram(buckets: BucketDistribution, labels: (String, Any)*)(implicit name: Name): Histogram
    Definition Classes
    Stats
  6. def info(properties: (String, Any)*): Unit

    A pseudo-metric used to expose application information in labels.

    A pseudo-metric used to expose application information in labels.

    E.g.

    info("version" -> "0.1.0", "commit" -> "deadbeef")

    will create the metric

    build_info{version="0.1.0", commit="deadbeef"} 1.0

    Note that the actual value will always be 1.

    Definition Classes
    Stats
  7. def metrics: String

    Show metrics as they are right now.

    Show metrics as they are right now.

    See also writeMetricsTo() for a note on consistency.

    Definition Classes
    Stats
  8. def namedCounter(name: String, labels: (String, Any)*): Counter

    Create and register counter with a given name and labels.

    Create and register counter with a given name and labels.

    The final metrics name will be composed of the passed name plus any labels, according to the prometheus syntax.

    Definition Classes
    Stats
  9. def namedGauge(name: String, labels: (String, Any)*): Gauge
    Definition Classes
    Stats
  10. def namedHistogram(name: String, labels: (String, Any)*): Histogram
    Definition Classes
    Stats
  11. def namedHistogram(name: String, buckets: BucketDistribution, labels: (String, Any)*): Histogram
    Definition Classes
    Stats
  12. val prefix: String
    Definition Classes
    Stats
  13. lazy val probeFailureCounter: Option[Counter]
    Definition Classes
    Probing
  14. lazy val probePool: ScheduledExecutorService
    Definition Classes
    Probing
  15. def writeMetricsTo(out: OutputStream): Unit

    Write metrics as they are right now to the given output stream.

    Write metrics as they are right now to the given output stream.

    Concurrency note: this method does not block updating metrics while it is called. This can lead to inconsistent reads where, while printing metrics to the output stream, latter metrics are updated to a new value while an old value from a previous metric has already been printed. Nevertheless, these inconsistent reads offer increased performance and are acceptable for two reasons: 1) metrics may only ever be added; they can never be removed 2) atomic reads are not important for the purpose of metrics collection

    Definition Classes
    Stats
  16. object BucketDistribution
  17. object Probing
  18. object probe
    Definition Classes
    Probing
  19. object Stats
  20. object util

Inherited from Probing

Inherited from Stats

Inherited from AnyRef

Inherited from Any

Ungrouped