ocaml-opentelemetry/dev/opentelemetry/Opentelemetry/Collector/index.html
2022-04-20 16:47:44 +00:00

5 lines
No EOL
5.6 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 (opentelemetry.Opentelemetry.Collector)</title><link rel="stylesheet" href="../../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.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">opentelemetry</a> &#x00BB; <a href="../index.html">Opentelemetry</a> &#x00BB; Collector</nav><header class="odoc-preamble"><h1>Module <code><span>Opentelemetry.Collector</span></code></h1><p>Collector types</p><p>These types are used by backend implementations, to send events to collectors such as Jaeger.</p><p>Note: most users will not need to touch this module</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type" id="type-sender" class="anchored"><a href="#type-sender" class="anchor"></a><code><span><span class="keyword">type</span> <span>'msg sender</span></span><span> = </span><span>{</span></code><table><tr id="type-sender.send" class="anchored"><td class="def record field"><a href="#type-sender.send" class="anchor"></a><code><span>send : 'a. <span><span class="type-var">'msg</span> <span class="arrow">&#45;&gt;</span></span> <span>ret:<span>( <span>unit <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span> )</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span>;</span></code></td></tr></table><code><span>}</span></code></div><div class="spec-doc"><p>Sender interface for a message of type <code>msg</code>. Inspired from Logs' reporter (see <a href="https://erratique.ch/software/logs/doc/Logs/index.html#sync">its doc</a>) but without <code>over</code> as it doesn't make much sense in presence of batching.</p><p>The <code>ret</code> callback is used to return the desired type (unit, or a Lwt promise, or anything else) once the event has been transferred to the backend. It doesn't mean the event has been collected yet, it could sit in a batch queue for a little while.</p></div></div><div class="odoc-spec"><div class="spec module-type" id="module-type-BACKEND" class="anchored"><a href="#module-type-BACKEND" class="anchor"></a><code><span><span class="keyword">module</span> <span class="keyword">type</span> <a href="module-type-BACKEND/index.html">BACKEND</a></span><span> = <span class="keyword">sig</span> ... <span class="keyword">end</span></span></code></div><div class="spec-doc"><p>Collector client interface.</p></div></div><div class="odoc-spec"><div class="spec type" id="type-backend" class="anchored"><a href="#type-backend" class="anchor"></a><code><span><span class="keyword">type</span> backend</span><span> = <span>(<span class="keyword">module</span> <a href="module-type-BACKEND/index.html">BACKEND</a>)</span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-backend" class="anchored"><a href="#val-backend" class="anchor"></a><code><span><span class="keyword">val</span> backend : <span><span><a href="#type-backend">backend</a> option</span> <span class="xref-unresolved">Stdlib</span>.ref</span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-has_backend" class="anchored"><a href="#val-has_backend" class="anchor"></a><code><span><span class="keyword">val</span> has_backend : <span>unit <span class="arrow">&#45;&gt;</span></span> bool</span></code></div><div class="spec-doc"><p>Is there a configured backend?</p></div></div><div class="odoc-spec"><div class="spec value" id="val-send_trace" class="anchored"><a href="#val-send_trace" class="anchor"></a><code><span><span class="keyword">val</span> send_trace : <span><span><a href="../Proto/Trace/index.html#type-resource_spans">Proto.Trace.resource_spans</a> list</span> <span class="arrow">&#45;&gt;</span></span> <span>ret:<span>( <span>unit <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span> )</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-send_metrics" class="anchored"><a href="#val-send_metrics" class="anchor"></a><code><span><span class="keyword">val</span> send_metrics :
<span><span><a href="../Proto/Metrics/index.html#type-resource_metrics">Proto.Metrics.resource_metrics</a> list</span> <span class="arrow">&#45;&gt;</span></span>
<span>ret:<span>( <span>unit <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span> )</span> <span class="arrow">&#45;&gt;</span></span>
<span class="type-var">'a</span></span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-rand_bytes_16" class="anchored"><a href="#val-rand_bytes_16" class="anchor"></a><code><span><span class="keyword">val</span> rand_bytes_16 : <span>unit <span class="arrow">&#45;&gt;</span></span> bytes</span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-rand_bytes_8" class="anchored"><a href="#val-rand_bytes_8" class="anchor"></a><code><span><span class="keyword">val</span> rand_bytes_8 : <span>unit <span class="arrow">&#45;&gt;</span></span> bytes</span></code></div></div><div class="odoc-spec"><div class="spec value" id="val-tick" class="anchored"><a href="#val-tick" class="anchor"></a><code><span><span class="keyword">val</span> tick : <span>unit <span class="arrow">&#45;&gt;</span></span> unit</span></code></div><div class="spec-doc"><p>Do background work. Call this regularly if the collector doesn't already have a ticker thread or internal timer.</p></div></div></div></body></html>