ocaml-trace/trace/Trace_core/Collector/index.html
2026-02-11 01:45:18 +00:00

2 lines
3.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>Collector (trace.Trace_core.Collector)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 3.1.0"/><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">Index</a> &#x00BB; <a href="../../index.html">trace</a> &#x00BB; <a href="../index.html">Trace_core</a> &#x00BB; Collector</nav><header class="odoc-preamble"><h1>Module <code><span>Trace_core.Collector</span></code></h1><p>A global collector.</p><p>The collector, if present, is responsible for collecting messages and spans, and storing them, recording them, forward them, or offering them to other services and processes.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type extension anchored" id="extension-decl-Span_dummy"><a href="#extension-decl-Span_dummy" class="anchor"></a><code><span><span class="keyword">type</span> <span class="xref-unresolved">Trace_core__.Types.span</span> += </span></code><ol><li id="extension-Span_dummy" class="def variant extension anchored"><a href="#extension-Span_dummy" class="anchor"></a><code><span>| </span><span><span class="extension">Span_dummy</span></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-dummy_span"><a href="#val-dummy_span" class="anchor"></a><code><span><span class="keyword">val</span> dummy_span : <span class="xref-unresolved">Trace_core__.Types.span</span></span></code></div><div class="spec-doc"><p>A fake span that never emits data. All collectors should handle this span by doing nothing.</p></div></div><div class="odoc-spec"><div class="spec module anchored" id="module-Callbacks"><a href="#module-Callbacks" class="anchor"></a><code><span><span class="keyword">module</span> <a href="Callbacks/index.html">Callbacks</a></span><span> : <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = </span></code><ol><li id="type-t.C_none" class="def variant constructor anchored"><a href="#type-t.C_none" class="anchor"></a><code><span>| </span><span><span class="constructor">C_none</span></span></code><div class="def-doc"><span class="comment-delim">(*</span><p>No collector.</p><span class="comment-delim">*)</span></div></li><li id="type-t.C_some" class="def variant constructor anchored"><a href="#type-t.C_some" class="anchor"></a><code><span>| </span><span><span class="constructor">C_some</span> : <span class="type-var">'st</span> * <span><span class="type-var">'st</span> <a href="Callbacks/index.html#type-t">Callbacks.t</a></span> <span class="arrow">&#45;&gt;</span> <a href="#type-t">t</a></span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Collector with a state and some callbacks.</p><span class="comment-delim">*)</span></div></li></ol></div><div class="spec-doc"><p>Definition of a collector.</p><p>This is only relevant to implementors of tracing backends; to instrument your code you only need to look at the <a href="../../Trace/index.html"><code>Trace</code></a> module.</p><p>The definition changed since 0.11 to a record of callbacks + a state</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-is_some"><a href="#val-is_some" class="anchor"></a><code><span><span class="keyword">val</span> is_some : <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> bool</span></code></div></div></div></body></html>