ocaml-opentelemetry/opentelemetry-client-ocurl/Opentelemetry_client_ocurl/Config/index.html
2024-07-22 15:10:39 +00:00

12 lines
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>Config (opentelemetry-client-ocurl.Opentelemetry_client_ocurl.Config)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.2"/><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-client-ocurl</a> &#x00BB; <a href="../index.html">Opentelemetry_client_ocurl</a> &#x00BB; Config</nav><header class="odoc-preamble"><h1>Module <code><span>Opentelemetry_client_ocurl.Config</span></code></h1><p>Configuration for the ocurl backend</p></header><div class="odoc-content"><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 class="keyword">private</span> </span><span>{</span></code><ol><li id="type-t.debug" class="def record field anchored"><a href="#type-t.debug" class="anchor"></a><code><span>debug : bool;</span></code></li><li id="type-t.url" class="def record field anchored"><a href="#type-t.url" class="anchor"></a><code><span>url : string;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Url of the endpoint. Default is &quot;http://localhost:4318&quot;, or &quot;OTEL_EXPORTER_OTLP_ENDPOINT&quot; if set.</p><span class="comment-delim">*)</span></div></li><li id="type-t.headers" class="def record field anchored"><a href="#type-t.headers" class="anchor"></a><code><span>headers : <span><span>(string * string)</span> list</span>;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>API headers sent to the endpoint. Default is none or &quot;OTEL_EXPORTER_OTLP_HEADERS&quot; if set.</p><span class="comment-delim">*)</span></div></li><li id="type-t.batch_timeout_ms" class="def record field anchored"><a href="#type-t.batch_timeout_ms" class="anchor"></a><code><span>batch_timeout_ms : int;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Number of milliseconds after which we will emit a batch, even incomplete. Note that the batch might take longer than that, because this is only checked when a new event occurs or when a tick is emitted. Default 2_000.</p><span class="comment-delim">*)</span></div></li><li id="type-t.bg_threads" class="def record field anchored"><a href="#type-t.bg_threads" class="anchor"></a><code><span>bg_threads : int;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Are there background threads, and how many? Default <code>4</code>. This will be adjusted to be at least <code>1</code> and at most <code>32</code>.</p><span class="comment-delim">*)</span></div></li><li id="type-t.ticker_thread" class="def record field anchored"><a href="#type-t.ticker_thread" class="anchor"></a><code><span>ticker_thread : bool;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>If true, start a thread that regularly checks if signals should be sent to the collector. Default <code>true</code></p><span class="comment-delim">*)</span></div></li><li id="type-t.ticker_interval_ms" class="def record field anchored"><a href="#type-t.ticker_interval_ms" class="anchor"></a><code><span>ticker_interval_ms : int;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>Interval for ticker thread, in milliseconds. This is only useful if <code>ticker_thread</code> is <code>true</code>. This will be clamped between <code>2 ms</code> and some longer interval (maximum <code>60s</code> currently). Default 500.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.7</li></ul><span class="comment-delim">*)</span></div></li><li id="type-t.self_trace" class="def record field anchored"><a href="#type-t.self_trace" class="anchor"></a><code><span>self_trace : bool;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p>If true, the OTEL library will also emit its own spans. Default <code>false</code>.</p><ul class="at-tags"><li class="since"><span class="at-tag">since</span> 0.7</li></ul><span class="comment-delim">*)</span></div></li></ol><code><span>}</span></code></div><div class="spec-doc"><p>Configuration.</p><p>To build one, use <a href="#val-make"><code>make</code></a> below. This might be extended with more fields in the future.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-make"><a href="#val-make" class="anchor"></a><code><span><span class="keyword">val</span> make :
<span><span class="optlabel">?debug</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?url</span>:string <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?headers</span>:<span><span>(string * string)</span> list</span> <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?batch_timeout_ms</span>:int <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?bg_threads</span>:int <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?ticker_thread</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?ticker_interval_ms</span>:int <span class="arrow">&#45;&gt;</span></span>
<span><span class="optlabel">?self_trace</span>:bool <span class="arrow">&#45;&gt;</span></span>
<span>unit <span class="arrow">&#45;&gt;</span></span>
<a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Make a configuration.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-pp"><a href="#val-pp" class="anchor"></a><code><span><span class="keyword">val</span> pp : <span><a href="../../../ocaml/Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> unit</span></code></div></div></div></body></html>