mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 20:07:55 -04:00
deploy: 036c108a27
This commit is contained in:
parent
70df750cc1
commit
bb592b9c1c
4 changed files with 13 additions and 6 deletions
|
|
@ -21,7 +21,7 @@
|
|||
<span><span>| `String</span> of string</span> ]</span>)</span>
|
||||
list</span> <span class="arrow">-></span></span>
|
||||
<span><span><a href="#type-span">span</a> list</span> <span class="arrow">-></span></span>
|
||||
unit</span></code></div><div class="spec-doc"><p>Sync emitter.</p><p>This instructs the collector to forward the spans to some backend at a later point.</p><p><b>NOTE</b> be careful not to call this inside a Gc alarm, as it can cause deadlocks.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-scope"><a href="#type-scope" class="anchor"></a><code><span><span class="keyword">type</span> scope</span><span> = <a href="../../../opentelemetry/Opentelemetry/Scope/index.html#type-t">Opentelemetry.Scope.t</a></span><span> = </span><span>{</span></code><ol><li id="type-scope.trace_id" class="def record field anchored"><a href="#type-scope.trace_id" class="anchor"></a><code><span>trace_id : <a href="../../../opentelemetry/Opentelemetry/Trace_id/index.html#type-t">Opentelemetry.Trace_id.t</a>;</span></code></li><li id="type-scope.span_id" class="def record field anchored"><a href="#type-scope.span_id" class="anchor"></a><code><span>span_id : <a href="../../../opentelemetry/Opentelemetry/Span_id/index.html#type-t">Opentelemetry.Span_id.t</a>;</span></code></li><li id="type-scope.events" class="def record field anchored"><a href="#type-scope.events" class="anchor"></a><code><span><span class="keyword">mutable</span> events : <span><a href="../../../opentelemetry/Opentelemetry/Event/index.html#type-t">Opentelemetry.Event.t</a> list</span>;</span></code></li><li id="type-scope.attrs" class="def record field anchored"><a href="#type-scope.attrs" class="anchor"></a><code><span><span class="keyword">mutable</span> attrs : <span><a href="../../../opentelemetry/Opentelemetry/Span/index.html#type-key_value">Opentelemetry.Span.key_value</a> list</span>;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> use Scope.t</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_event"><a href="#val-add_event" class="anchor"></a><code><span><span class="keyword">val</span> add_event :
|
||||
unit</span></code></div><div class="spec-doc"><p>Sync emitter.</p><p>This instructs the collector to forward the spans to some backend at a later point.</p><p><b>NOTE</b> be careful not to call this inside a Gc alarm, as it can cause deadlocks.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-scope"><a href="#type-scope" class="anchor"></a><code><span><span class="keyword">type</span> scope</span><span> = <a href="../../../opentelemetry/Opentelemetry/Scope/index.html#type-t">Opentelemetry.Scope.t</a></span><span> = </span><span>{</span></code><ol><li id="type-scope.trace_id" class="def record field anchored"><a href="#type-scope.trace_id" class="anchor"></a><code><span>trace_id : <a href="../../../opentelemetry/Opentelemetry/Trace_id/index.html#type-t">Opentelemetry.Trace_id.t</a>;</span></code></li><li id="type-scope.span_id" class="def record field anchored"><a href="#type-scope.span_id" class="anchor"></a><code><span>span_id : <a href="../../../opentelemetry/Opentelemetry/Span_id/index.html#type-t">Opentelemetry.Span_id.t</a>;</span></code></li><li id="type-scope.events" class="def record field anchored"><a href="#type-scope.events" class="anchor"></a><code><span><span class="keyword">mutable</span> events : <span><a href="../../../opentelemetry/Opentelemetry/Event/index.html#type-t">Opentelemetry.Event.t</a> list</span>;</span></code></li><li id="type-scope.attrs" class="def record field anchored"><a href="#type-scope.attrs" class="anchor"></a><code><span><span class="keyword">mutable</span> attrs : <span><a href="../../../opentelemetry/Opentelemetry/Span/index.html#type-key_value">Opentelemetry.Span.key_value</a> list</span>;</span></code></li><li id="type-scope.links" class="def record field anchored"><a href="#type-scope.links" class="anchor"></a><code><span><span class="keyword">mutable</span> links : <span><a href="../../../opentelemetry/Opentelemetry/Span_link/index.html#type-t">Opentelemetry.Span_link.t</a> list</span>;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> use Scope.t</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_event"><a href="#val-add_event" class="anchor"></a><code><span><span class="keyword">val</span> add_event :
|
||||
<span><a href="../../../opentelemetry/Opentelemetry/Scope/index.html#type-t">Opentelemetry.Scope.t</a> <span class="arrow">-></span></span>
|
||||
<span><span>(<span>unit <span class="arrow">-></span></span> <a href="../../../opentelemetry/Opentelemetry/Event/index.html#type-t">Opentelemetry.Event.t</a>)</span> <span class="arrow">-></span></span>
|
||||
unit</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> use Scope.add_event</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_attrs"><a href="#val-add_attrs" class="anchor"></a><code><span><span class="keyword">val</span> add_attrs :
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<span><span class="optlabel">?scope</span>:<a href="../../../opentelemetry/Opentelemetry/Scope/index.html#type-t">Opentelemetry.Scope.t</a> <span class="arrow">-></span></span>
|
||||
<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>(<span><a href="../../../opentelemetry/Opentelemetry/Scope/index.html#type-t">Opentelemetry.Scope.t</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, 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>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -21,7 +21,7 @@
|
|||
<span><span>| `String</span> of string</span> ]</span>)</span>
|
||||
list</span> <span class="arrow">-></span></span>
|
||||
<span><span><a href="#type-span">span</a> list</span> <span class="arrow">-></span></span>
|
||||
unit</span></code></div><div class="spec-doc"><p>Sync emitter.</p><p>This instructs the collector to forward the spans to some backend at a later point.</p><p><b>NOTE</b> be careful not to call this inside a Gc alarm, as it can cause deadlocks.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-scope"><a href="#type-scope" class="anchor"></a><code><span><span class="keyword">type</span> scope</span><span> = <a href="../Scope/index.html#type-t">Scope.t</a></span><span> = </span><span>{</span></code><ol><li id="type-scope.trace_id" class="def record field anchored"><a href="#type-scope.trace_id" class="anchor"></a><code><span>trace_id : <a href="../Trace_id/index.html#type-t">Trace_id.t</a>;</span></code></li><li id="type-scope.span_id" class="def record field anchored"><a href="#type-scope.span_id" class="anchor"></a><code><span>span_id : <a href="../Span_id/index.html#type-t">Span_id.t</a>;</span></code></li><li id="type-scope.events" class="def record field anchored"><a href="#type-scope.events" class="anchor"></a><code><span><span class="keyword">mutable</span> events : <span><a href="../Event/index.html#type-t">Event.t</a> list</span>;</span></code></li><li id="type-scope.attrs" class="def record field anchored"><a href="#type-scope.attrs" class="anchor"></a><code><span><span class="keyword">mutable</span> attrs : <span><a href="../Span/index.html#type-key_value">Span.key_value</a> list</span>;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> use Scope.t</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_event"><a href="#val-add_event" class="anchor"></a><code><span><span class="keyword">val</span> add_event : <span><a href="../Scope/index.html#type-t">Scope.t</a> <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> <a href="../Event/index.html#type-t">Event.t</a>)</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> use Scope.add_event</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_attrs"><a href="#val-add_attrs" class="anchor"></a><code><span><span class="keyword">val</span> add_attrs : <span><a href="../Scope/index.html#type-t">Scope.t</a> <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> <span><a href="../index.html#type-key_value">key_value</a> list</span>)</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> use Scope.add_attrs</li></ul></div></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_' :
|
||||
unit</span></code></div><div class="spec-doc"><p>Sync emitter.</p><p>This instructs the collector to forward the spans to some backend at a later point.</p><p><b>NOTE</b> be careful not to call this inside a Gc alarm, as it can cause deadlocks.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-scope"><a href="#type-scope" class="anchor"></a><code><span><span class="keyword">type</span> scope</span><span> = <a href="../Scope/index.html#type-t">Scope.t</a></span><span> = </span><span>{</span></code><ol><li id="type-scope.trace_id" class="def record field anchored"><a href="#type-scope.trace_id" class="anchor"></a><code><span>trace_id : <a href="../Trace_id/index.html#type-t">Trace_id.t</a>;</span></code></li><li id="type-scope.span_id" class="def record field anchored"><a href="#type-scope.span_id" class="anchor"></a><code><span>span_id : <a href="../Span_id/index.html#type-t">Span_id.t</a>;</span></code></li><li id="type-scope.events" class="def record field anchored"><a href="#type-scope.events" class="anchor"></a><code><span><span class="keyword">mutable</span> events : <span><a href="../Event/index.html#type-t">Event.t</a> list</span>;</span></code></li><li id="type-scope.attrs" class="def record field anchored"><a href="#type-scope.attrs" class="anchor"></a><code><span><span class="keyword">mutable</span> attrs : <span><a href="../Span/index.html#type-key_value">Span.key_value</a> list</span>;</span></code></li><li id="type-scope.links" class="def record field anchored"><a href="#type-scope.links" class="anchor"></a><code><span><span class="keyword">mutable</span> links : <span><a href="../Span_link/index.html#type-t">Span_link.t</a> list</span>;</span></code></li></ol><code><span>}</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> use Scope.t</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_event"><a href="#val-add_event" class="anchor"></a><code><span><span class="keyword">val</span> add_event : <span><a href="../Scope/index.html#type-t">Scope.t</a> <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> <a href="../Event/index.html#type-t">Event.t</a>)</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> use Scope.add_event</li></ul></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_attrs"><a href="#val-add_attrs" class="anchor"></a><code><span><span class="keyword">val</span> add_attrs : <span><a href="../Scope/index.html#type-t">Scope.t</a> <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> <span><a href="../index.html#type-key_value">key_value</a> list</span>)</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><ul class="at-tags"><li class="deprecated"><span class="at-tag">deprecated</span> use Scope.add_attrs</li></ul></div></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>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
<span><span class="optlabel">?scope</span>:<a href="../Scope/index.html#type-t">Scope.t</a> <span class="arrow">-></span></span>
|
||||
<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>(<span><a href="../Scope/index.html#type-t">Scope.t</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, 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>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue