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.
(initialize registry)
Initialize all collectors for thread-pool instrumentation, including
Initialize all collectors for thread-pool instrumentation, including - http_thread_count - http_waiting_count - http_wait_time_ms
(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:
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.
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.
(wrap-queue-latency-middleware f registry bounded-thread-pool)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close