ocaml-opentelemetry/opentelemetry/Opentelemetry/Metrics_callbacks/index.html
2024-09-20 16:15:07 +00:00

2 lines
1.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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.3"/><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> &#x00BB; <a href="../index.html">Opentelemetry</a> &#x00BB; 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">&#45;&gt;</span></span> <span><a href="../Metrics/index.html#type-t">Metrics.t</a> list</span>)</span> <span class="arrow">&#45;&gt;</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>