Liking cljdoc? Tell your friends :D
Clojure only.

steffan-westcott.clj-otel.exporter.prometheus

Metric data exporter to Prometheus.

Metric data exporter to Prometheus.
raw docstring

http-serverclj

(http-server)
(http-server {:keys [host port executor registry otel-scope-enabled label?
                     default-aggregation-selector memory-mode default-handler]
              :or {otel-scope-enabled true}})

Returns a Prometheus HTTP server which acts as a MetricReader implementation. May take an option map as follows:

keydescription
:hostThe host to bind to (default: "0.0.0.0").
:portThe port to bind to (default: 9464).
:executorExecutorService to use for the Prometheus HTTP server (default: a fixed pool of 5 daemon threads).
:registryPrometheusRegistry to use for the HTTP server (default: new registry).
:otel-scope-enabledTrue if otel_scope_* attributes are generated (default: true).
:label?fn which takes the name of a resource attribute and returns true if it should be added as a label on each exported metric (default: no attributes added).
:default-aggregation-selectorFunction which takes an InstrumentType and returns default Aggregation (default: same as DefaultAggregationSelector/getDefault).

|:memory-mode | Either :immutable-data for thread safe or :reusable-data for non thread safe (but reduced) data allocations (default: :reusable-data). |:default-handler | Override for default HttpHandler.

Returns a Prometheus HTTP server which acts as a `MetricReader`
implementation. May take an option map as follows:

| key                           | description |
|-------------------------------|-------------|
|`:host`                        | The host to bind to (default: `"0.0.0.0"`).
|`:port`                        | The port to bind to (default: `9464`).
|`:executor`                    | `ExecutorService` to use for the Prometheus HTTP server (default: a fixed pool of 5 daemon threads).
|`:registry`                    | `PrometheusRegistry` to use for the HTTP server (default: new registry).
|`:otel-scope-enabled`          | True if `otel_scope_*` attributes are generated (default: true).
|`:label?`                      | fn which takes the name of a resource attribute and returns true if it should be added as a label on each exported metric (default: no attributes added).
|`:default-aggregation-selector`| Function which takes an `InstrumentType` and returns default `Aggregation` (default: same as `DefaultAggregationSelector/getDefault`).

|`:memory-mode`                 | Either `:immutable-data` for thread safe or `:reusable-data` for non thread safe (but reduced) data allocations (default: `:reusable-data`).
|`:default-handler`             | Override for default HttpHandler.
sourceraw docstring

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

× close