Liking cljdoc? Tell your friends :D

com.unbounce.dogstatsd.ring

Ring middleware for instrumenting HTTP request/responses.

The middleware provides the following dogstatsd metrics:

  • http.1xx - counter of 1xx responses
  • http.2xx - counter of 2xx responses
  • http.3xx - counter of 3xx responses
  • http.4xx - counter of 4xx responses
  • http.5xx - counter of 5xx responses
  • http.count - counter for total requests
  • http.exception - counter for exceptions raised
  • http.duration - histogram of request duration

See wrap-ring-metric for more information.

Ring middleware for instrumenting HTTP request/responses.

The middleware provides the following dogstatsd metrics:

- http.1xx  - counter of 1xx responses
- http.2xx  - counter of 2xx responses
- http.3xx  - counter of 3xx responses
- http.4xx  - counter of 4xx responses
- http.5xx  - counter of 5xx responses
- http.count     - counter for total requests
- http.exception - counter for exceptions raised
- http.duration  - histogram of request duration

See `wrap-ring-metric` for more information.
raw docstring

healthcheck-request?clj

(healthcheck-request? request)

Returns true if the healthcheck request is for a known health-check.

This function is aware of the following health-checks

  • AWS ELB HealthChecks
  • Pingdom
Returns true if the healthcheck request is for a known health-check.

This function is aware of the following health-checks
- AWS ELB HealthChecks
- Pingdom
sourceraw docstring

status-code-metricclj

(status-code-metric status)
source

wrap-http-metricsclj

(wrap-http-metrics handler)
(wrap-http-metrics handler {:keys [sample-rate tags loggable?] :as options})

Wraps HTTP status-code-metrics for your application.

You should put this middleware at the top of your middleware stack to get the most visibility.

The middleware provides the following dogstatsd metrics:

  • http.1xx - counter of 1xx responses
  • http.2xx - counter of 2xx responses
  • http.3xx - counter of 3xx responses
  • http.4xx - counter of 4xx responses
  • http.5xx - counter of 5xx responses
  • http.count - counter for total requests
  • http.exception - counter for exceptions raised
  • http.duration - histogram of request duration

Options is a map of:

  • loggable? A predicate that filters a request from being measured. By default, this is (component healthcheck-request?)
  • sample-rate A float between 0 and 1. Sets the rate of requests to sample.
  • tags vector of additional tags to add to the metrics
Wraps HTTP status-code-metrics for your application.

You should put this middleware at the top of your middleware stack to get the
most visibility.

The middleware provides the following dogstatsd metrics:

- http.1xx  - counter of 1xx responses
- http.2xx  - counter of 2xx responses
- http.3xx  - counter of 3xx responses
- http.4xx  - counter of 4xx responses
- http.5xx  - counter of 5xx responses
- http.count     - counter for total requests
- http.exception - counter for exceptions raised
- http.duration  - histogram of request duration

Options is a map of:
- `loggable?` A predicate that filters a request from being measured. By default, this is `(component healthcheck-request?)`
- `sample-rate` A float between 0 and 1. Sets the rate of requests to sample.
- `tags` vector of additional tags to add to the metrics
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close