Class

github.gphat.censorinus

StatsDClient

Related Doc: package censorinus

Permalink

class StatsDClient extends Client

A StatsD client! You should create one of these and reuse it across your application.

Linear Supertypes
Client, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StatsDClient
  2. Client
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StatsDClient(hostname: String = "localhost", port: Int = MetricSender.DEFAULT_STATSD_PORT, prefix: String = "", defaultSampleRate: Double = 1.0, asynchronous: Boolean = true, allowExceptions: Boolean = false)

    Permalink

    Creates a new client instance

    Creates a new client instance

    hostname

    the host to send metrics to, defaults to localhost

    port

    the port to send metrics to, defaults to 8125

    prefix

    A prefix to add to all metric names. A period will be added to the end, resulting in prefix.metricname.

    defaultSampleRate

    A sample rate default to be used for all metric methods. Defaults to 1.0

    asynchronous

    True if you want the client to asynch, false for blocking!

    allowExceptions

    If false, any SocketExceptions will be swallowed silently

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. val consecutiveDroppedMetrics: AtomicLong

    Permalink
    Definition Classes
    Client
  7. def counter(name: String, value: Double, sampleRate: Double = defaultSampleRate, bypassSampler: Boolean = false): Unit

    Permalink

    Emit a counter metric.

    Emit a counter metric.

    name

    The name of the metric

    value

    The value of the metric, or how much to increment by

    sampleRate

    The rate at which to sample this metric.

    bypassSampler

    If true, the metric will always be passed through, but the sample rate will be included in the emitted metric. This is useful for when you occasionally do your own sampling.

  8. def decrement(name: String, value: Double = 1, sampleRate: Double = defaultSampleRate, bypassSampler: Boolean = false): Unit

    Permalink

    Emit a decrement metric.

    Emit a decrement metric.

    name

    The name of the metric

    value

    The value of the metric, or how much to decrement by. Defaults to -1

    sampleRate

    The rate at which to sample this metric.

    bypassSampler

    If true, the metric will always be passed through, but the sample rate will be included in the emitted metric. This is useful for when you occasionally do your own sampling.

  9. val defaultSampleRate: Double

    Permalink

    A sample rate default to be used for all metric methods.

    A sample rate default to be used for all metric methods. Defaults to 1.0

    Definition Classes
    Client
  10. def enqueue(metric: Metric, sampleRate: Double = defaultSampleRate, bypassSampler: Boolean = false): Unit

    Permalink
    Definition Classes
    Client
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def gauge(name: String, value: Double, sampleRate: Double = defaultSampleRate, bypassSampler: Boolean = false): Unit

    Permalink

    Emit a gauge metric.

    Emit a gauge metric.

    name

    The name of the metric

    value

    The value of the metric, or current value of the gauge

    sampleRate

    The rate at which to sample this metric.

    bypassSampler

    If true, the metric will always be passed through, but the sample rate will be included in the emitted metric. This is useful for when you occasionally do your own sampling.

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  16. def increment(name: String, value: Double = 1, sampleRate: Double = defaultSampleRate, bypassSampler: Boolean = false): Unit

    Permalink

    Emit an increment metric.

    Emit an increment metric.

    name

    The name of the metric

    value

    The value of the metric, or the amount to increment by. Defaults to 1

    sampleRate

    The rate at which to sample this metric.

    bypassSampler

    If true, the metric will always be passed through, but the sample rate will be included in the emitted metric. This is useful for when you occasionally do your own sampling.

  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def makeName(name: String): String

    Permalink
    Attributes
    protected
    Definition Classes
    Client
  19. val maxBatchSize: Option[Int]

    Permalink

    maximum size of byte buffer supplied to sender

    maximum size of byte buffer supplied to sender

    Definition Classes
    Client
  20. def meter(name: String, value: Double, sampleRate: Double = defaultSampleRate, bypassSampler: Boolean = false): Unit

    Permalink

    Emit a meter metric.

    Emit a meter metric.

    name

    The name of the metric

    value

    The value of the meter

    sampleRate

    The rate at which to sample this metric.

    bypassSampler

    If true, the metric will always be passed through, but the sample rate will be included in the emitted metric. This is useful for when you occasionally do your own sampling.

  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  24. def set(name: String, value: String): Unit

    Permalink

    Emit e a set metric.

    Emit e a set metric.

    name

    The name of the metric

    value

    The item to add to the set

  25. def shutdown(): Unit

    Permalink

    Explicitly shut down the client and it's underlying bits.

    Explicitly shut down the client and it's underlying bits.

    Definition Classes
    Client
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. def timer(name: String, milliseconds: Double, sampleRate: Double = defaultSampleRate, bypassSampler: Boolean = false): Unit

    Permalink

    Emit a timer metric.

    Emit a timer metric.

    name

    The name of the metric

    sampleRate

    The rate at which to sample this metric.

    bypassSampler

    If true, the metric will always be passed through, but the sample rate will be included in the emitted metric. This is useful for when you occasionally do your own sampling.

  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Client

Inherited from AnyRef

Inherited from Any

Ungrouped