mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -04:00
deploy: 9680d61a36
This commit is contained in:
parent
74efdad1c1
commit
70df750cc1
4 changed files with 4 additions and 10 deletions
|
|
@ -39,10 +39,7 @@
|
|||
<span><span class="optlabel">?links</span>:<span><a href="../../../opentelemetry/Opentelemetry/Span_link/index.html#type-t">Opentelemetry.Span_link.t</a> list</span> <span class="arrow">-></span></span>
|
||||
<span>string <span class="arrow">-></span></span>
|
||||
<span><span>(<span><a href="#type-scope">scope</a> <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span>
|
||||
<span>(<span>unit <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span>)</span>
|
||||
* <span>(<span><span><span>(unit, string * <a href="../../../ocaml/Stdlib/Printexc/index.html#type-raw_backtrace">Stdlib.Printexc.raw_backtrace</a>)</span> <a href="../../../ocaml/Stdlib/index.html#type-result">result</a></span> <span class="arrow">-></span></span>
|
||||
unit)</span></span></code></div></div><p>Sync span guard.</p><p>Notably, this includes <em>implicit</em> scope-tracking: if called without a <code>~scope</code> argument (or <code>~parent</code>/<code>~trace_id</code>), it will check in the <code>Ambient_context</code> for a surrounding environment, and use that as the scope. Similarly, it uses <code>Scope.with_ambient_scope</code> to <em>set</em> a new scope in the ambient context, so that any logically-nested calls to <a href="#val-with_"><code>with_</code></a> will use this span as their parent.</p><p><b>NOTE</b> be careful not to call this inside a Gc alarm, as it can cause deadlocks.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">force_new_trace_id</span> <p>if true (default false), the span will not use a ambient scope, the <code>~scope</code> argument, nor <code>~trace_id</code>, but will instead always create fresh identifiers for this span</p></li></ul></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_"><a href="#val-with_" class="anchor"></a><code><span><span class="keyword">val</span> with_ :
|
||||
<span>(<span>unit <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> * <span>(<span><span><span>(unit, exn * <a href="../../../ocaml/Stdlib/Printexc/index.html#type-raw_backtrace">Stdlib.Printexc.raw_backtrace</a>)</span> <a href="../../../ocaml/Stdlib/index.html#type-result">result</a></span> <span class="arrow">-></span></span> unit)</span></span></code></div></div><p>Sync span guard.</p><p>Notably, this includes <em>implicit</em> scope-tracking: if called without a <code>~scope</code> argument (or <code>~parent</code>/<code>~trace_id</code>), it will check in the <code>Ambient_context</code> for a surrounding environment, and use that as the scope. Similarly, it uses <code>Scope.with_ambient_scope</code> to <em>set</em> a new scope in the ambient context, so that any logically-nested calls to <a href="#val-with_"><code>with_</code></a> will use this span as their parent.</p><p><b>NOTE</b> be careful not to call this inside a Gc alarm, as it can cause deadlocks.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">force_new_trace_id</span> <p>if true (default false), the span will not use a ambient scope, the <code>~scope</code> argument, nor <code>~trace_id</code>, but will instead always create fresh identifiers for this span</p></li></ul></details></div><div class="odoc-spec"><div class="spec value anchored" id="val-with_"><a href="#val-with_" class="anchor"></a><code><span><span class="keyword">val</span> with_ :
|
||||
<span><span class="optlabel">?force_new_trace_id</span>:bool <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?trace_state</span>:string <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?service_name</span>:string <span class="arrow">-></span></span>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -33,10 +33,7 @@
|
|||
<span><span class="optlabel">?links</span>:<span><a href="../Span_link/index.html#type-t">Span_link.t</a> list</span> <span class="arrow">-></span></span>
|
||||
<span>string <span class="arrow">-></span></span>
|
||||
<span><span>(<span><a href="#type-scope">scope</a> <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span>
|
||||
<span>(<span>unit <span class="arrow">-></span></span>
|
||||
<span class="type-var">'a</span>)</span>
|
||||
* <span>(<span><span><span>(unit, string * <a href="../../../ocaml/Stdlib/Printexc/index.html#type-raw_backtrace">Stdlib.Printexc.raw_backtrace</a>)</span> <a href="../../../ocaml/Stdlib/index.html#type-result">result</a></span> <span class="arrow">-></span></span>
|
||||
unit)</span></span></code></div></div><p>Sync span guard.</p><p>Notably, this includes <em>implicit</em> scope-tracking: if called without a <code>~scope</code> argument (or <code>~parent</code>/<code>~trace_id</code>), it will check in the <code>Ambient_context</code> for a surrounding environment, and use that as the scope. Similarly, it uses <a href="../Scope/index.html#val-with_ambient_scope"><code>Scope.with_ambient_scope</code></a> to <em>set</em> a new scope in the ambient context, so that any logically-nested calls to <a href="#val-with_"><code>with_</code></a> will use this span as their parent.</p><p><b>NOTE</b> be careful not to call this inside a Gc alarm, as it can cause deadlocks.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">force_new_trace_id</span> <p>if true (default false), the span will not use a ambient scope, the <code>~scope</code> argument, nor <code>~trace_id</code>, but will instead always create fresh identifiers for this span</p></li></ul><div class="odoc-spec"><div class="spec value anchored" id="val-with_"><a href="#val-with_" class="anchor"></a><code><span><span class="keyword">val</span> with_ :
|
||||
<span>(<span>unit <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> * <span>(<span><span><span>(unit, exn * <a href="../../../ocaml/Stdlib/Printexc/index.html#type-raw_backtrace">Stdlib.Printexc.raw_backtrace</a>)</span> <a href="../../../ocaml/Stdlib/index.html#type-result">result</a></span> <span class="arrow">-></span></span> unit)</span></span></code></div></div><p>Sync span guard.</p><p>Notably, this includes <em>implicit</em> scope-tracking: if called without a <code>~scope</code> argument (or <code>~parent</code>/<code>~trace_id</code>), it will check in the <code>Ambient_context</code> for a surrounding environment, and use that as the scope. Similarly, it uses <a href="../Scope/index.html#val-with_ambient_scope"><code>Scope.with_ambient_scope</code></a> to <em>set</em> a new scope in the ambient context, so that any logically-nested calls to <a href="#val-with_"><code>with_</code></a> will use this span as their parent.</p><p><b>NOTE</b> be careful not to call this inside a Gc alarm, as it can cause deadlocks.</p><ul class="at-tags"><li class="parameter"><span class="at-tag">parameter</span> <span class="value">force_new_trace_id</span> <p>if true (default false), the span will not use a ambient scope, the <code>~scope</code> argument, nor <code>~trace_id</code>, but will instead always create fresh identifiers for this span</p></li></ul><div class="odoc-spec"><div class="spec value anchored" id="val-with_"><a href="#val-with_" class="anchor"></a><code><span><span class="keyword">val</span> with_ :
|
||||
<span><span class="optlabel">?force_new_trace_id</span>:bool <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?trace_state</span>:string <span class="arrow">-></span></span>
|
||||
<span><span class="optlabel">?service_name</span>:string <span class="arrow">-></span></span>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue