mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-09 12:23:32 -04:00
2 lines
1.8 KiB
HTML
2 lines
1.8 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Metrics_callbacks (opentelemetry.Opentelemetry.Metrics_callbacks)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.4"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">opentelemetry</a> » <a href="../index.html">Opentelemetry</a> » Metrics_callbacks</nav><header class="odoc-preamble"><h1>Module <code><span>Opentelemetry.Metrics_callbacks</span></code></h1><p>A set of callbacks that produce metrics when called. The metrics are automatically called regularly.</p><p>This allows applications to register metrics callbacks from various points in the program (or even in libraries), and not worry about setting alarms/intervals to emit them.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-register"><a href="#val-register" class="anchor"></a><code><span><span class="keyword">val</span> register : <span><span>(<span>unit <span class="arrow">-></span></span> <span><a href="../Metrics/index.html#type-t">Metrics.t</a> list</span>)</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p><code>register f</code> adds the callback <code>f</code> to the list.</p><p><code>f</code> will be called at unspecified times and is expected to return a list of metrics. It might be called regularly by the backend, in particular (but not only) when <a href="../Collector/index.html#val-tick"><code>Collector.tick</code></a> is called.</p></div></div></div></body></html>
|