Liking cljdoc? Tell your friends :D

org.purefn.kurosawa.web.instrument

Thread-pool instrumentation for Ring-compliant web server. In most cases you may want to use only initialize and instrument and use the output to launch the web server.

This library does not include prometheus (iapetos and bidi) and preflex as dependencies directly, so requiring this namespace will break unless you've done so yourself.

Thread-pool instrumentation for Ring-compliant web server. In most cases you may want
to use only `initialize` and `instrument` and use the output to launch the web server.

This library does not include prometheus (iapetos and bidi) and preflex as dependencies
directly, so requiring this namespace will break unless you've done so yourself.
raw docstring

*context*clj

source

initializeclj

(initialize registry)

Initialize all collectors for thread-pool instrumentation, including

  • http_thread_count
  • http_waiting_count
  • http_wait_time_ms
Initialize all collectors for thread-pool instrumentation, including
- http_thread_count
- http_waiting_count
- http_wait_time_ms
sourceraw docstring

instrumentclj

(instrument registry handler thread-count queue-size)

Given Prometheus registry, Ring handler fn and thread-pool parameters, construct a bounded thread-pool and return a map containing following instrumented objects:

KeyValue description
:handlerRing handler that log Prometheus metrics for the thread-pool
:thread-poolThread-pool that captures wait-time in the queue for requests

You should use the returned thread-pool as the worker-pool in your web server.

Given Prometheus registry, Ring handler fn and thread-pool parameters,
construct a bounded thread-pool and return a map containing following
instrumented objects:

| Key          | Value description |
|--------------|-------------------|
| :handler     | Ring handler that log Prometheus metrics for the thread-pool  |
| :thread-pool | Thread-pool that captures wait-time in the queue for requests |

You should use the returned thread-pool as the worker-pool in your web server.
sourceraw docstring

make-instrumented-appclj

(make-instrumented-app config handler)
source

make-server-thread-poolclj

(make-server-thread-pool thread-count queue-size)
source

thread-count-collectorclj

source

wait-time-ms-collectorclj

source

waiting-count-collectorclj

source

wrap-queue-latency-middlewareclj

(wrap-queue-latency-middleware f registry bounded-thread-pool)
source

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

× close