Couchbase C Client  3.3.2
Asynchronous C Client for Couchbase
Operation Metrics

Output per-operation latencies.

libcouchbase will keep track of the latencies for each operation performed on an instance. Unlike lcb_get_timings, this will aggregate the latencies for each operation (get, store, etc...) separately. The latencies are measured from the time the command is called (e.g. lcb_get) until the associated callback is called.

The default metrics provider will output a separate histogram for each operation to stdout. This happens periodically, see LCB_CNTL_OP_METRICS_FLUSH_INTERVAL for details on setting this.

An external metrics collector, such as OpenTelemetry, can be used instead. The lcb_CREATEOPTS accept an lcbmetrics_RECORDER struct which, when provided, will allow for an external library (such as OpenTelemetry) to be called.

add-to-group lcb-operation-metrics {