Liking cljdoc? Tell your friends :D

signal.data-platform-telemetry.metrics


*default-registry*clj


create-registryclj

Create a fresh iapetos collector registry.

Create a fresh iapetos collector registry.
raw docstring

decrement-messages-in-flightclj

(decrement-messages-in-flight registry)
(decrement-messages-in-flight registry n)

Decrement the number of messages currently being processed by the service.

Decrement the number of messages currently being processed by the service.
raw docstring

document-latency-histogram-bucketsclj

(document-latency-histogram-buckets)
(document-latency-histogram-buckets {:keys [target-slo low-resolution-step
                                            high-resolution-step
                                            max-bucket-value exponential-factor]
                                     :or {target-slo 90
                                          low-resolution-step 15
                                          high-resolution-step 5
                                          max-bucket-value (* 180 60)
                                          exponential-factor 1.2}})

Generate buckets for document latency histograms. Works for both pipeline and queue-worker. Defaults are provided as an example for pipeline latency.

This function should be used in the REPL to generate latency histogram buckets

Generate buckets for document latency histograms. Works for both pipeline and queue-worker. Defaults are provided as an example for pipeline latency.

This function should be used in the REPL to generate latency histogram buckets
raw docstring

exponential-bucketsclj

(exponential-buckets start factor max-value)
(exponential-buckets start factor max-value initial-step)

Generates buckets with exponentially growing sizes based on <factor>, with initial step <initial-step>, starting at <start>, and ending with the bucket including the <max-value> - this may be larger than the max-value to include it.

If initial step is not provided, <start> is used as initial step.

Generates buckets with exponentially growing sizes based on <factor>, with initial step <initial-step>, starting at <start>,
and ending with the bucket including the <max-value> - this may be larger than the max-value to include it.

If initial step is not provided, <start> is used as initial step.
raw docstring

get-default-histogram-bucketsclj

(get-default-histogram-buckets {:keys [max-batch-size] :or {max-batch-size 50}})

Returns the default buckets for histograms for the metrics library.

Buckets can subsequently be overwritten by overwriting a given key.

Returns the default buckets for histograms for the metrics library.

Buckets can subsequently be overwritten by overwriting a given key.
raw docstring

increment-messages-in-flightclj

(increment-messages-in-flight registry)
(increment-messages-in-flight registry n)

Increment the number of messages currently being processed by the service.

Increment the number of messages currently being processed by the service.
raw docstring

initclj

(init)
(init {:keys [registry ring? jvm?]
       :or {ring? true jvm? true registry *default-registry*}})

Initialises a Prometheus metrics registry and returns it.

Initialises a Prometheus metrics registry and returns it.
raw docstring

message-ack-timecljmacro

(message-ack-time registry & body)

Track the total time taken by the macro body to acknowledge (i.e. output) the message result, e.g. writing to S3 and publishing to SNS.

Track the total time taken by the macro body to acknowledge (i.e. output) the message result, e.g. writing to S3 and publishing to SNS.
raw docstring

message-process-timecljmacro

(message-process-time registry & body)

Track the time taken by the macro body to run the service logic on the message.

Track the time taken by the macro body to run the service logic on the message.
raw docstring

message-publish-timecljmacro

(message-publish-time registry & body)

Track the time taken by the macro body to publish a new onward message, e.g to SNS.

Track the time taken by the macro body to publish a new onward message, e.g to SNS.
raw docstring

message-read-timecljmacro

(message-read-time registry & body)

Track the time taken by the macro body to read data for the message from storage, e.g S3.

Track the time taken by the macro body to read data for the message from storage, e.g S3.
raw docstring

message-result-write-timecljmacro

(message-result-write-time registry & body)

Track the time taken by the macro body to write the message result to storage, e.g S3.

Track the time taken by the macro body to write the message result to storage, e.g S3.
raw docstring

message-total-timecljmacro

(message-total-time registry & body)

Track the total time taken by the macro body to run the read the message, run logic, and acknoweledge it.

Track the total time taken by the macro body to run the read the message, run logic, and acknoweledge it.
raw docstring

observe-message-ack-timeclj

Track the total time taken to acknowledge (i.e. output) the message result, e.g. writing to S3 and publishing to SNS.

Track the total time taken to acknowledge (i.e. output) the message result, e.g. writing to S3 and publishing to SNS.
raw docstring

observe-message-batch-sizeclj

(observe-message-batch-size registry size)

Observe the size of a batch being processed, e.g. 50 for an article mini-batch, or 1 for a single document.

Observe the size of a batch being processed, e.g. 50 for an article mini-batch, or 1 for a single document.
raw docstring

observe-message-process-timeclj

Track the time taken to run the service logic on the message.

Track the time taken to run the service logic on the message.
raw docstring

observe-message-publish-timeclj

Track the time taken to publish a new onward message, e.g to SNS.

Track the time taken to publish a new onward message, e.g to SNS.
raw docstring

observe-message-read-timeclj

Track the time taken to read data for the message from storage, e.g S3.

Track the time taken to read data for the message from storage, e.g S3.
raw docstring

observe-message-received-timesclj

(observe-message-received-times registry times-count)

Track the number of times the message was received (> 1 means this is a retry)

Track the number of times the message was received (> 1 means this is a retry)
raw docstring

observe-message-result-write-timeclj

Track the time taken to write the message result to storage, e.g S3.

Track the time taken to write the message result to storage, e.g S3.
raw docstring

observe-message-total-timeclj

Track the total time taken to run the read the message, run logic, and acknoweledge it.

Track the total time taken to run the read the message, run logic, and acknoweledge it.
raw docstring

observe-queue-worker-errorclj

(observe-queue-worker-error registry _)

Observe an error in processing.

Observe an error in processing.
raw docstring

observe-time-secondsclj

(observe-time-seconds metric registry start-timestamp-ms end-timestamp-ms)

Given a metric name and a start/end timestamp in milliseconds, observes the time in seconds between the two times.

Given a metric name and a start/end timestamp in milliseconds, observes the time in seconds between the two times.
raw docstring

observe-total-document-latencyclj

Track the total time (seconds) between when upstream service sent message to the queue and this service sent message to output topic after processing it

Track the total time (seconds) between when upstream service sent message to the queue and this service sent message to output topic after processing it
raw docstring

pipeline-latencyclj

(pipeline-latency registry {:keys [histogram-bucket-overrides] :as config})

Registers metrics to track latency from point-to-point in a pipeline to the given registry.

The configuration histogram-bucket-overrides.pipeline-document-latency must be provided - be sure to include the explicit value of any SLOs in your bucket distribution.

Registers metrics to track latency from point-to-point in a pipeline to the given registry.

The configuration histogram-bucket-overrides.pipeline-document-latency must be provided - be sure to include the explicit value of any SLOs in your bucket distribution.
raw docstring

queue-readerclj

(queue-reader registry {:keys [histogram-bucket-overrides] :as config})

Registers queue reader metrics on the given registry.

Registers queue reader metrics on the given registry.
raw docstring

queue-writerclj

(queue-writer registry {:keys [histogram-bucket-overrides] :as config})

Registers queue worker metrics on the given registry.

Registers queue worker metrics on the given registry.
raw docstring

record-pipeline-latencyclj

(record-pipeline-latency registry
                         {:keys [mode measured-from]}
                         document-received-date-time)

Observe pipeline latency metrics for a document.

These metrics are labelled by

  • "mode": the mode of operation of the service if applicable, e.g. realtime, non-realtime
  • "measured-from": where the latency was measured from, e.g. "ingestion" or "pipeline_start"
Observe pipeline latency metrics for a document.

These metrics are labelled by
- "mode": the mode of operation of the service if applicable, e.g. realtime, non-realtime
- "measured-from": where the latency was measured from, e.g. "ingestion" or "pipeline_start"
raw docstring

ring-wrap-instrumentationclj

(ring-wrap-instrumentation app registry)

Wraps a ring application in Prometheus instrumentation.

Wraps a ring application in Prometheus instrumentation.
raw docstring

ring-wrap-metrics-exposeclj

(ring-wrap-metrics-expose app registry)

Creates a ring handler which exposes Prometheus metrics for the given registry on /internal/metrics.

Creates a ring handler which exposes Prometheus metrics for the given registry on /internal/metrics.
raw docstring

take-while-and-n-moreclj

(take-while-and-n-more pred n coll)

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

× close