com.netaporter.salad.metrics.spray.metrics

CounterMetric

case class CounterMetric(prefix: String, metricsEventActor: ActorRef, includeMethod: Boolean = false, handleFailures: CountIncrementer = CounterMetric.nilIncrementer, handleRejections: CountIncrementer = CounterMetric.nilIncrementer, handleExceptions: CountIncrementer = CounterMetric.nilIncrementer, handleSuccesses: CountIncrementer = CounterMetric.incSuccesses) extends CounterBase with Product with Serializable

Provides a builder that can provide a new spray.routing.Directive, which

will count successful, failed, rejected or excepted operations in a given spray.routing.Route

The actual identifiers for this counter will be, given a specific prefix:

- {prefix}.successes - {prefix}.failures - {prefix}.rejections - {prefix}.exceptions

prefix

The user-specific designation for this counter's Id.

metricsEventActor

The instance of the actor that is recieveing the IncCounter message requests

handleFailures

A function that will increment {prefix}.failures. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.

handleRejections

A function that will increment {prefix}.rejections. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.

handleExceptions

A function that will increment {prefix}.exceptions. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.

handleSuccesses

A function that will increment {prefix}.successes. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#incSuccesses.

Linear Supertypes
Serializable, Serializable, Product, Equals, CounterBase, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CounterMetric
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. CounterBase
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CounterMetric(prefix: String, metricsEventActor: ActorRef, includeMethod: Boolean = false, handleFailures: CountIncrementer = CounterMetric.nilIncrementer, handleRejections: CountIncrementer = CounterMetric.nilIncrementer, handleExceptions: CountIncrementer = CounterMetric.nilIncrementer, handleSuccesses: CountIncrementer = CounterMetric.incSuccesses)

    Create the counter metric with a specific prefix.

    Create the counter metric with a specific prefix.

    prefix

    The user-specific designation for this counter's Id.

    metricsEventActor

    The instance of the actor that is recieveing the IncCounter message requests

    handleFailures

    A function that will increment {prefix}.failures. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.

    handleRejections

    A function that will increment {prefix}.rejections. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.

    handleExceptions

    A function that will increment {prefix}.exceptions. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.

    handleSuccesses

    A function that will increment {prefix}.successes. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#incSuccesses.

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. def all: CounterMetric

    Returns a new instance of the CounterMetric that will count successes, failures, rejections and exceptions.

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def buildAfter(key: String): (Any) ⇒ Any

    The spray.routing.directives.BasicDirectives#around directive requires that the caller return a function that will process what happens after the specific spray.routing.Route completes.

    The spray.routing.directives.BasicDirectives#around directive requires that the caller return a function that will process what happens after the specific spray.routing.Route completes. This method builds that function.

    key

    The prefix that we can send to any of the incrementation handlers.

    returns

    The function that can deal with the result of the spray.routing.Route's evaluation.

    Definition Classes
    CounterBase
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val count: Directive0

    This is the instance of the spray.routing.Directive that you can use in your spray.routing.Route.

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def exceptions: CounterMetric

    Returns a new instance of the CounterMetric that will count exceptions.

    Returns a new instance of the CounterMetric that will count exceptions. Any other counting aspect will remain as it was.

  11. def failures: CounterMetric

    Returns a new instance of the CounterMetric that will count failures.

    Returns a new instance of the CounterMetric that will count failures. Any other counting aspect will remain as it was.

  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. val handleExceptions: CountIncrementer

    A function that will increment {prefix}.exceptions.

    A function that will increment {prefix}.exceptions. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.

    Definition Classes
    CounterMetricCounterBase
  15. val handleFailures: CountIncrementer

    A function that will increment {prefix}.failures.

    A function that will increment {prefix}.failures. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.

    Definition Classes
    CounterMetricCounterBase
  16. val handleRejections: CountIncrementer

    A function that will increment {prefix}.rejections.

    A function that will increment {prefix}.rejections. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.

    Definition Classes
    CounterMetricCounterBase
  17. val handleSuccesses: CountIncrementer

    A function that will increment {prefix}.successes.

    A function that will increment {prefix}.successes. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#incSuccesses.

    Definition Classes
    CounterMetricCounterBase
  18. val includeMethod: Boolean

  19. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  20. val metricsEventActor: ActorRef

    The instance of the actor that is recieveing the IncCounter message requests

    The instance of the actor that is recieveing the IncCounter message requests

    Definition Classes
    CounterMetricCounterBase
  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. def noSuccesses: CounterMetric

    Returns a new instance of the CounterMetric that will not count successes.

    Returns a new instance of the CounterMetric that will not count successes. Any other counting aspect will remain as it was.

  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. val prefix: String

    The user-specific designation for this counter's Id.

  26. def rejections: CounterMetric

    Returns a new instance of the CounterMetric that will count rejections.

    Returns a new instance of the CounterMetric that will count rejections. Any other counting aspect will remain as it was.

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from CounterBase

Inherited from AnyRef

Inherited from Any

Ungrouped