Create the counter metric that will use the route path for the metric name.
Create the counter metric that will use the route path for the metric name.
The instance of the MetricRegistry that holds the counter metric.
A function that will increment {prefix}.failures
. Defaults to
com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.
A function that will increment {prefix}.rejections
. Defaults to
com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.
A function that will increment {prefix}.exceptions
. Defaults to
com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.
A function that will increment {prefix}.successes
. Defaults to
com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#incSuccesses.
Returns a new instance of the CounterMetric that will count successes, failures, rejections and exceptions.
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.
The prefix that we can send to any of the incrementation handlers.
The function that can deal with the result of the spray.routing.Route's evaluation.
This is the instance of the spray.routing.Directive that you can use in your spray.routing.Route.
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.
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.
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.
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.
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.
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.
The instance of the MetricRegistry that holds the counter metric.
The instance of the MetricRegistry that holds the counter metric.
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.
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.
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, depending on the incoming URL (e.g.
/path/to/route
translates topath.to.route
):- {path.to.route}.successes - {path.to.route}.failures - {path.to.route}.rejections - {path.to.route}.exceptions
The instance of the MetricRegistry that holds the counter metric.
A function that will increment
{prefix}.failures
. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.A function that will increment
{prefix}.rejections
. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.A function that will increment
{prefix}.exceptions
. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#nilIncrementer.A function that will increment
{prefix}.successes
. Defaults to com.netaporter.salad.metrics.spray.metrics.CounterMetric.CountIncrementer#incSuccesses.