(clear- x)(clear! x)Clears all metrics of the collector. After calling clear! captured labeled instances are detached.
Clears all metrics of the collector. After calling clear! captured labeled instances are detached.
(collector x)(collector x label)(collector x label-1 label-2)(collector x label-1 label-2 label-3)(collector x label-1 label-2 label-3 & labels)Coerce to collector.
Coerce to collector.
(collector-fn n)Generates the collector- function for SimpleCollector with a max arity of n.
Generates the collector- function for SimpleCollector with a max arity of n.
(collector? x)(counter? x)(create-counter name help & more)(create-gauge name help & more)(create-histogram name help & more)(dec- x amount)(dec! gauge & labels-and-amount)Decrements a gauge by the given amount or 1.
Decrements a gauge by the given amount or 1.
(defcounter name help attr-map? & label-names)Defines a counter as var with name.
Metrics are required to have a name and a help text. An optional :namespace and
:subsystem can be defined via attr-map. The metrics name can be overridden by
:name in attr-map. Per default, the var name is used with dashes replaced by
underscores. The full name of the metric is namespace_subsystem_name and has
to conform to /[a-zA-Z_:][a-zA-Z0-9_:]*/.
Labels are used to provide dimensions to metrics. For example: a counter defined with two labels has two dimensions for which you have to supply values when incrementing.
Counters have to be registered in a CollectorRegistry in order to be
available for dump-metrics.
Defines a counter as var with `name`. Metrics are required to have a name and a help text. An optional :namespace and :subsystem can be defined via `attr-map`. The metrics name can be overridden by :name in `attr-map`. Per default, the var name is used with dashes replaced by underscores. The full name of the metric is `namespace_subsystem_name` and has to conform to `/[a-zA-Z_:][a-zA-Z0-9_:]*/`. Labels are used to provide dimensions to metrics. For example: a counter defined with two labels has two dimensions for which you have to supply values when incrementing. Counters have to be registered in a `CollectorRegistry` in order to be available for `dump-metrics`.
(defgauge name help attr-map? & label-names)Defines a gauge as var with name.
Metrics are required to have a name and a help text. An optional :namespace and
:subsystem can be defined via attr-map. The metrics name can be overridden by
:name in attr-map. Per default the var name is used with dashes replaced by
underscores. The full name of the metric is namespace_subsystem_name and has
to conform to /[a-zA-Z_:][a-zA-Z0-9_:]*/.
Labels are used to provide dimensions to metrics. For example: a gauge defined with two labels has two dimensions for which you have to supply values when incrementing.
Gauges have to be registered in a CollectorRegistry in order to be available
for dump-metrics.
Defines a gauge as var with `name`. Metrics are required to have a name and a help text. An optional :namespace and :subsystem can be defined via `attr-map`. The metrics name can be overridden by :name in `attr-map`. Per default the var name is used with dashes replaced by underscores. The full name of the metric is `namespace_subsystem_name` and has to conform to `/[a-zA-Z_:][a-zA-Z0-9_:]*/`. Labels are used to provide dimensions to metrics. For example: a gauge defined with two labels has two dimensions for which you have to supply values when incrementing. Gauges have to be registered in a `CollectorRegistry` in order to be available for `dump-metrics`.
(defhistogram name help attr-map? buckets & label-names)Defines a histogram as var with name.
Metrics are required to have a name and a help text. An optional :namespace and
:subsystem can be defined via attr-map. The metrics name can be overridden by
:name in attr-map. Per default the var name is used with dashes replaced by
underscores. The full name of the metric is namespace_subsystem_name and has
to conform to /[a-zA-Z_:][a-zA-Z0-9_:]*/.
Buckets is a collection of upper bounds of buckets for the histogram.
Labels are used to provide dimensions to metrics. For example: a histogram defined with two labels has two dimensions for which you have to supply values when incrementing.
Histograms have to be registered in a CollectorRegistry in order to be
available for dump-metrics.
Defines a histogram as var with `name`. Metrics are required to have a name and a help text. An optional :namespace and :subsystem can be defined via `attr-map`. The metrics name can be overridden by :name in `attr-map`. Per default the var name is used with dashes replaced by underscores. The full name of the metric is `namespace_subsystem_name` and has to conform to `/[a-zA-Z_:][a-zA-Z0-9_:]*/`. Buckets is a collection of upper bounds of buckets for the histogram. Labels are used to provide dimensions to metrics. For example: a histogram defined with two labels has two dimensions for which you have to supply values when incrementing. Histograms have to be registered in a `CollectorRegistry` in order to be available for `dump-metrics`.
(dump-metrics)(dump-metrics registry)Dumps metrics of the given or default registry using simple client's text format.
Dumps metrics of the given or default registry using simple client's text format.
(extend-protocol-dec & classes)(extend-protocol-get & classes)(extend-protocol-inc & classes)(extend-protocol-observe & classes)(extend-protocol-set & classes)(extend-protocol-start-timer & classes)(extend-protocol-timer & classes)(gauge? x)(get- x)(get collector & labels)Gets the current value of a counter, gauge, histogram or summary.
For a counter and a gauge the value is a double. For a histogram the value is a map containing a :histogram/sum and a :histogram/buckets value.
Gets the current value of a counter, gauge, histogram or summary. For a counter and a gauge the value is a double. For a histogram the value is a map containing a :histogram/sum and a :histogram/buckets value.
(histogram? x)(inc- x amount)(inc! collector & labels-and-amount)Increments a counter or gauge by the given amount or 1.
Increments a counter or gauge by the given amount or 1.
(observe- x amount)(observe! collector & labels-and-amount)Observes a given amount to a histogram or summary.
Observes a given amount to a histogram or summary.
(observe-duration! timer)Observes the duration of a histogram or summary timer.
Observes the duration of a histogram or summary timer.
(set- x amount)(set! gauge amount)(set! gauge label amount)(set! gauge & labels amount)Sets a gauge to the given amount.
Sets a gauge to the given amount.
(start-timer- x)(summary? x)(observe-duration- x)(timer collector & labels)Returns a timer of a gauge, histogram or summary.
The timer is closeable and observes the time at close. It can be used with with-open.
Returns a timer of a gauge, histogram or summary. The timer is closeable and observes the time at close. It can be used with with-open.
(timer? x)Returns true if x is a timer, else false.
Returns `true` if x is a timer, else `false`.
(collector- x)(collector- x label)(collector- x label-1 label-2)(collector- x label-1 label-2 label-3)(collector- x label-1 label-2 label-3 labels)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |